hi,
i've been asked to create a shell script that accepts a username and password which i then need to check against the database..
but the script won't be running any sql commands.. it will run another script that also accepts a username and password.
what i have so far
sqlplus -s $ora_user_pass << EOF
set echo off
set heading off
select sysdate from dual;
exit
EOF
ret_code=$?
if [ "$ret_code" -gt 0 ]; then
echo "Invalid username and/or password"
exit
else
....
this works ok but it's a little dirty.. when the username and password are incorrect it shows a bunch of errors instead of the displaying "Invalid username and/or password".. this is coming from the sqlplus.
i'd appreciate any other suggestions.
thanks
allen