I have an 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 ?
Example of what I'm trying to do.
in_code is the variable in the
xecute.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 !