Check previous error status
Hello,
This statement works if there is an error within the last command in
Line 01. I have to modify the code in Line 02 so that it checks for
errors in previous statements in Line 01. I want to get the error status
for previous commands in the statement in Line 01 such as the error
status for the command 'cat $ORA_LIST_FILE'. How to do it?
Statements:
01 cat $ORA_LIST_FILE | wc -l 1> $ORA_LIST_COUNT_FILE_TMP 2>>
${ORA_LOG_FILE}
02 if [ ! $? -eq 0 ]; then
03 exit
04 fi
|