Any Bash features you'd like to see?
Ilya Palagin
tux-4CS0UopE6WdBDgjK7y7TUQ at public.gmane.org
Wed May 11 16:41:19 UTC 2005
Quoting William Park <opengeometry-FFYn/CNdgSA at public.gmane.org>:
>> Undefined variables in shell scripts are difficult to debug sometimes.
>> An option to disallow them?
>
> Explain what you mean by "undefined". Variable can be "undefined" if it
> does not exist. Or, it can be "undefined" if it has empty value (nul).
Here is what I want:
#!/bin/bash
S1='hello world'
echo $Sl
Executing of this code won't give any warnings, just an empty string.
Instead, I
would like to see "ERROR: undefined variable Sl in string 3", because
I'm trying
to print SL, not S-one.
I want to trap variables which weren't used with '=' or another assignment
operator.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list