[plug] Shell Scripting Confusion

Mike Holland myk at golden.wattle.id.au
Wed Feb 9 12:40:59 WST 2000


On Wed, 9 Feb 2000, Christian wrote:

> I'm almost a complete novice at shell scripting as this email will
> probably show but I'm starting to get very confused...

When you see the answer you'll want to stick with perl.
Shell programming is ugly.
 
> if [ -n $output ]; then

Since $output is empty, that evaluates as  "if [ -n ]; then "
which ought to at least give an error message?

Try:
	if [ -n "$output" ]; then

I'll bet you're groaning by now.


Mike Holland <mike at golden.wattle.id.au>            Perth, Australia.
                          --==--




More information about the plug mailing list