The following commands help you establish a connection between UNIX and ORACLE.
Top Commands to Establish Connection Between UNIX and ORACLE
echo “connecting to database”
sqlplus -s /nolog <<EOF
Select * from all_users;
In the end you need to give exit command to come out.