Does the script threw any error..? If so please post the same. And there is a semicolon miss in your code exit;
Below is a sample code to login to sqlplus and querying by passing a parameter
#!/bin/bash
line=sysdate
cnt=2
sqlplus -s user_t/user_t@ORADEV <<EOF > $(echo $PWD)/outfile.txt
select $line from dual;
select * from emp where emp_id='$cnt';
exit;
EOF