Date: Sat, 13 Nov 2010 19:19:34 -0200 From: "Carlos A. M. dos Santos" <unixmania@gmail.com> To: FreeBSD Hackers <freebsd-hackers@freebsd.org> Cc: Devin Teske <dteske@vicor.com> Subject: Re: Spinner Function for Shell Scripts Message-ID: <AANLkTi=Us-OoLHpO2YPM4VCgFUQM2BX3jcPSaJnXF9rG@mail.gmail.com> In-Reply-To: <1289506363.30235.113.camel@localhost.localdomain> References: <1289506363.30235.113.camel@localhost.localdomain>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 11, 2010 at 6:12 PM, Devin Teske <dteske@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. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0DONE=3D$( /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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=Us-OoLHpO2YPM4VCgFUQM2BX3jcPSaJnXF9rG>