Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

script: bourne etc flite

0 views
Skip to first unread message

Conor Williams

unread,
Oct 12, 2021, 6:15:41 PM10/12/21
to
#!/bin/sh
#conor.w...@gmail.com bird /c:202109090808:23
takeit()
{
# echo $0
# echo $*
# echo $1
# echo $2
# echo hello
# echo $1; sleep 1; clear

for i in $*
do
echo $i; sleep 1; clear

done
}

takeitdown ()
{
for i in $*
do
echo $i; sleep 1; clear
done
}

while [ 1 ]; do
/bin/echo -e ^[c
takeit -----00----- ~~~~~00~~~~~ ~^~~~00~~~^~ ^^~~~00~~~^^ ^^^==00==^^^ ^^^^-00-^^^^ ^^^^^00^^^^^
takeitdown \'@@@@00@@@@\' \'\'\'\'\'00\'\'\'\'\'
done

Eli the Bearded

unread,
Oct 12, 2021, 8:44:44 PM10/12/21
to
The ^[c isn't doing anything for me in an xterm, even after I fix it to
have an actual escape. This system's /bin/echo doesn't do -e, and ksh's
(and bash's) "echo -e" needs a \E for escape.

I don't see why you have takeit and takeitdown (is it a reference I'm
missing?) And lack of fractional sleep is why shell scripts are a hard
way to do animation. :^(

Anyway, borrowing your design:

#!/bin/sh
# catchin-flies.sh
takeit() {
clear
for i in "$@"; do
echo "$i"
done
sleep 1
}

n=0
while [ "$n" != 5 ]; do
n=$(($n + 1))
takeit "----->00" " (__)"
takeit "*---->00" " (__)"
takeit " *-->00" " (__)"
takeit " *>00" " (__)"
takeit " *>00" " (__)"
takeit " =00" " (__)"
takeit " >oo --__" " {__} -- ribbit"
takeit " =00" " (__)"
done
exit

Elijah
------
just a quicky
0 new messages