http://www.unix.com – Code: #!/bin/sh echo "Running Script to capture ORACLE Erros" # Change Directory to the actual logs path cd /home/nv8510/lognew err_var=`grep -in "ORA-" *` if[-n $var] then echo "THESE ARE THE ORACLE ERROR OCCURED" echo "$err_var" echo "************************************************************************" else echo "No erros" fi In the abv script i want to chk if the variables exits then i will display all the error msg and if not it will display No e (HowTos)