You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
323 B
16 lines
323 B
#!/bin/sh |
|
|
|
NUM=0 |
|
TOL=0 |
|
for cow in /usr/share/cowsay/cows/*.cow ; do |
|
TOL=$((TOL+1)) |
|
done |
|
|
|
SELECT=$(((`date +%M | sed -e 's|^0||'`*60+`date +%S | sed -e 's|^0||'`)%(TOL))) |
|
|
|
for cow in /usr/share/cowsay/cows/*.cow ; do |
|
NUM=$((NUM+1)) |
|
if [ $NUM = $SELECT ] ; then break ; fi |
|
done |
|
|
|
exec /usr/bin/cowsay -f $cow "$@"
|
|
|