I have this code, I thought it would automatically know the args sent to script when called from shell. But it seems to not see any...
main script:
. args
. errors
. opt
. clean
dbfile=""
opfile=""
# calls function in script below
chkarg
#check commands
args:
#
chkarg()
{
if [ $# -lt 4 ]
then
echo $USAGE
exit 1
fi
...
...
}
EDIT: args are not being sent to function, just tested echo statements throughout multiple lines of code. is it possible to call with $# ? I mean chkargs $# or something? or do I just need to put all my cmdline args checks into my main script?