Spinner Function for Shell Scripts

Carlos A. M. dos Santos unixmania at gmail.com
Sat Nov 13 21:47:47 UTC 2010


On Thu, Nov 11, 2010 at 6:12 PM, Devin Teske <dteske at vicor.com> wrote:
> Hi fellow hackers... I come with baring gifts!
>
> So, just as the subject-line says, ... here's an efficient and robust
> spinner function compatible with many shells.
>                        DONE=$( /bin/sh -c 'read -t 0 DONE; echo $DONE' )

Is this expected to be portable to other operating systems? The dash
shell, used as /bin/bash in Ubuntu, does not acept the "-t" argument
to the read builtin command. Using /bin/bash solves the problem.


More information about the freebsd-hackers mailing list