Re: Simple shell scripting question from a newbie.
On Wed, Feb 04, 2004 at 05:28:27PM +1100, Lex Hider wrote:
>
> Is a piece of code like the following...
>
> while [ x"$1" != x ]; do
> ...
> done
>
> the same as using the -z flag for test.
>
> It just looks like a weird way of doing things that occur frequently.
>
Habits due to portability of the code. That could be not a major concern
in debian, but if you need to ports scripts among many flavours of
current and ancient unices, that's a common trick to avoid pitfalls
due to different versions of the test program.
--
Francesco P. Lovergine
Reply to: