Have lot of questions in ksh as i struggle to understand the code. here is one which i couldnt find the answer
function prn_msg
{
print "command usage: "
print " $COMMAND -i<id> -d<date>"
exit $BADOPTIONS
} 1>&2
I understood that it prints the text to a stderr
output and exits the shell execution with the return code in BADOPTIONS
.
but don't understand what does the 1>&2
do