Hi
i am running oracle database import through a script and script scans the import log to see if there are any errors.
Now the porblem is that when i run the script the import log appears on the screen even if i direct the output of import to /dev/null.
imp "'/ as sysdba'" file=${exp_file} log=${RUN_PATH}/imp_${db}_${dt}.log parfile=config.par > /dev/null
i tried adding 2>&1 > /dev/null to the end but then the log appears in the log file instead of the screen ,which the script builds with
exec > ${RUN_PATH}/db_exp_full.log
i dont want the log either on the screen or the log file.I will just scan the log file for errors ,if any, mentioned in the log parameter of imp above.
Redirect any (error or ...) message [2] to standard output [1] as standard output went to /dev/null... So syntax is cmd cmd...>file 2>&1 (As for crontab lines: either you redirect in 2 separate files or you >toLogfile 2>&1 )