[nylug-talk] spinning slash

Sunny Dubey
Sat Nov 18 09:33:29 EST 2006


On Friday 17 November 2006 14:14, Paul Robbins wrote:
> That's very straightforward. However, i am having difficulty converting it
> to ksh or sh so it is portable to my Unix boxes too.
>

CHARS="/ - \ |"

while true ; do
    for i in $CHARS
        do printf "\b${i}"
        # whatever command you want
        if  [ "$?" != "0" ] ; then
            break
        fi
    done
done

Works on NetBSD's ash, 'nuff said.  (and zsh)

-- 
Sunny Dubey

  mail:  sunny at opencurve.org
  tele:  212.333.3542


More information about the nylug-talk mailing list