If $1 = "" I get an error, Help:-)
20 James D. Corder
isolated at alix.UUCP
Tue Oct 2 03:30:34 AEST 1990
Mon Oct 1 13:20:32 EDT 1990
Hello NetPeople:-)
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."
read $1
else
echo "${1} was inputed at the command line"
fi
However, this file will get the following error message.
jim: test: argument expected
How can I do this?
Thank you,
James D. Corder
...osu-cis!alix!jdc
...att!osu-cis!alix!jdc
alix!jdc at cis.ohio-state.edu
More information about the Comp.unix.questions
mailing list