First I' d like to say you guys are awesome.
I have a word document that I cut and paste into Textpad and it removed all the fancy formatting which is fine with me. I WinScp'd it to the box and and called it inputfile.txt.
Opened it in vi and don't see any special characters or stuff that my cause me headaches. Good.
The text looks like this.
-
(name of sql statement)
(blank line)
(actual sql statement) -
(name of sql statement)
(blank line)
(actual sql statement)
.... for around 15 sql statements
so the last line is
- (name of sql statement)
(blank line)
(actual sql statement)
I looped thru the file with the while ....read $line do echo $line done
and I can see every line.
I would like to be able to populate a variable with the (actual sql statement)
then I can connect to a database and execute that statement. Can someone help me with this?
Thank you