Hello,
Im really new to shell scripting and I'm trying to make a recursive algorithm, but I'm having difficulty in making a check to see wether a parameter has a value or not.
Code:
if [ $1 -eq NULL ] && [ $2 -eq NULL ]
then
echo "Parameters doesn't have a value ($1 and $2)"
else echo "$1 and $2 has a value or check failed"
exit 1
fi
Btw, im guessing theres differences when writing to a Kourne or Bash shell. I'd like it to work under ksh, but if it can only be done under bash then fine! :-)
Cheers in advance