In a shell script, i have this to capture the name of the errlog file:
DBERR_log=`ls $DBFILEMAINT_ERRFILE* | awk '{print $1}'`
if the file exist, then it captures the value well.
if the file doesn't exist, DBERR_log="", and it splits out the error from the command line:
"Some_file_name not found."
How do I direct the error to /dev/null so it doesn't split out the error when the file isn't found.
Thanks,
DBERR_log=`ls $DBFILEMAINT_ERRFILE* | awk '{print $1}'`
if the file exist, then it captures the value well.
if the file doesn't exist, DBERR_log="", and it splits out the error from the command line:
"Some_file_name not found."
How do I direct the error to /dev/null so it doesn't split out the error when the file isn't found.
Thanks,