I tried adding the following lines to my script, but when a value is not specified for positional parameter 1, an error is displayed.
if [ $1 = "help" ] || [ $1 = '-h' ]
then
echo "\nHELP\n==========\n
echo "Help commands"
...........
exit
else
continue
fi
The error is: ./TNG-job[3]: test: argument expected
How can I make this work without displaying an error message? Any help would be greatly appreciated.
Thanks,
John
if [ $1 = "help" ] || [ $1 = '-h' ]
then
echo "\nHELP\n==========\n
echo "Help commands"
...........
exit
else
continue
fi
The error is: ./TNG-job[3]: test: argument expected
How can I make this work without displaying an error message? Any help would be greatly appreciated.
Thanks,
John