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