If your sql file contains reference to variable of your script, you can do something like in this example :
$ cat ev.sh
my_var=Magic
eval text=\"$(<ev.txt)\"
cat <<EOD
$text
EOD
$ cat ev.txt
Value of variable my_var is ${my_var}
$ ./ev.sh
Value of variable my_var is Magic
$
If I do like this, when I run the script,it will be asking to enter value manually. And I don want this...
Enter value for list: 1234567890
old 1: select * from table where list='&list'
new 1: select * from prepaid_invoice where
list='1234567890'
---------- Post updated at 04:17 AM ---------- Previous update was at 04:15 AM ----------
Could u elaborate more. I'm new in shell scripting. Still a lot need to learn.
Could u give example based on my code. Or how to use it with my code. Thank you.