I currendtly have two if statements, each with a different exit code. How can I store these exit codes into a file?
if [ !condition 1 ];then
echo "Please enter valid name" 1>&2
exit 11
fi
if [ !condition 2 ];then
echo "Please enter valid digits" 1>&2
exit 12
fi
Is there anyway to redirect these specific exit codes into a file in bash?