I have to perform an operation in a script by connecting to oracle database.I am trying to use expdp command in my shell script to dump the data .
Vi ban.sh
expdp hr/oracle@oracle table=man directory =ban dumpfile=man.dmp
If [ $# -eq 0 ];then
echo 'fail'
fi
If [ $# -eq 1 ];then
echo 'pass'
fi
In the above script if the table name is given wrong then the oracle expdp fails the status check block in the script is passing through "pass" block but not fail block .How can i handle this situation ?