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

Rouben Rostamian rouben at math13.math.umbc.edu
Tue Oct 2 08:07:44 AEST 1990


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.
 >ie:
 >
 >if [ ${1} = "" ]
 >then
 >	echo "Please enter your option now."
 > ...etc...

  Replace the first line with:

     if [ "${1}" = "" ]

--



More information about the Comp.unix.questions mailing list