Given the following code:
if (($# == 0))
then
echo ERROR - no command line argument
echo
echo Usage: dailyrec.ksh MMDD
echo where MMDD is the month and day of the desired files
echo
else
...
fi
The first time each login session I run this script without a command line argument it gives the error message above. However, when I try to run it again without a command line argument, it skips this portion, follows the 'else' path, and gets really confused ... the command line argument gives it part of a file name it's looking for. I can log out and back in again and it'll show the error only on the first time it's run.
Tnx.
if (($# == 0))
then
echo ERROR - no command line argument
echo
echo Usage: dailyrec.ksh MMDD
echo where MMDD is the month and day of the desired files
echo
else
...
fi
The first time each login session I run this script without a command line argument it gives the error message above. However, when I try to run it again without a command line argument, it skips this portion, follows the 'else' path, and gets really confused ... the command line argument gives it part of a file name it's looking for. I can log out and back in again and it'll show the error only on the first time it's run.
Tnx.