Hello,
I have a sql script which when run prompts me to input a value, if i don't input any value and press the enter/return key it will select the default value and will pull all the records. I am trying to incorporate this into a shell script where i don't want the script to prompt me for any value and should just accept the "return key" by default. Is there a way i can do this ?
Eg of what i'm trying to do.
"in_code" is the variable in the the execute.sql which accepts a value. I want this variable to select the "enter/return" key by default. The code i use below doesn't work.
#! /bin/bash
sqlplus -s xxx/xxx<<!
define in_code='echo -e "\n"'
@execute.sql
exit
!
Any help will be appreciated.
Thanks.