If $1 = "" I get an error, Help:-)

Dave Turner dmt at PacBell.COM
Mon Oct 8 14:47:39 AEST 1990


In article <2919 at canisius.UUCP> pavlov at canisius.UUCP (Greg Pavlov) writes:
>In article <311 at alix.UUCP>, isolated at alix.UUCP (20 James D. Corder) writes:
>> 	I have a sh program that wants input at the command line.
>> However, I need an error out if the unser does not input at the command line.

Enclose the $1 in "s:

L
           if [ "$1" = "" ]

Without the quotes test sees just an equal sign and the ""

-- 
Dave Turner	415/823-2001	{att,bellcore,sun,ames,decwrl}!pacbell!dmt



More information about the Comp.unix.questions mailing list