The error I am getting is :
./wms_chkorder.ksh[62]: test: argument expected
I tried using $# -gt 0 and it worked! But I am just wondering why $1 does not work......Even if my code work, how do I check if a parameter variable has a value?
in ksh ... this is the other form of the one i wrote earlier ...
if [ $myvar ] ### this part here tests if the variable is set
then
do_something
fi
... there are other ways variables are tested and set --- see man ksh --- but i don't think they are what you need based on my interpretation of your question
... also, make sure your $1 is not reset by succeeding lines in your script prior to it being used by the mail code ....