|
KSH to find a ORA error in a log file
Hi:
i have writen a script that needs a finishing
Pourpouse is to find a particular error in a file after we enter file name
and the return msg would describe if >there is a error -> "Contact DBA"
if there is no oracle error ->"No ora error found."
for the same i have written a script but finding hard to how to write this script --- Following is the script
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#!/usr/bin/sh
echo This script will read the failed log file , and will echo the Oracle error message if it
echo is ther in the log file, for the same please contact the DBA-Support group
#
"A"="File name"
"B"="ORA-12545"
ls -ltr *.log_fail |grep ORA-12545 |head -10
#
if [grep"$A"= "$B"];then
echo "ORA ERROR FOUND"
else
echo "NO ORA ERROR FOUND"
fi
|