On Tue, Jan 24, 2006 at 04:55:37AM -0600, [EMAIL PROTECTED] wrote:
>
> Hi all,
>
> In order to avoid using undefined variables one can use the syntax:
> echo ${badvarname:?}
> which will result in error message would the variable be bad (not "defined"
> or
> empty). This kind of reference is tedious therefore one could use ksh -u (in
> a
> script)
> #!/bin/ksh -u
>
> the result is a check upon all variable references, which brings in a new
> problem.
>
> while ($1)
> do
> some stuff with $1
> shift
> done
>
> is there a solution for such a case?
I am not sure what exactly is the problem ...
You might want to use $# to see how many are left.
--
Didi
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]