Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

long shell commands

Status
Not open for further replies.

codemut

Programmer
Feb 29, 2008
26
US
Perhaps awk is not the best language for a long bash/sql interaction like that in quotes here:

command = "sqlite3 filename.sql <<SQL_ENTRY
... several lines of SQL ...
SQL_ENTRY"

Any ideas on how to make a command of many lines appear as one string (or how to better combine awk and sql)?
 
Something like this ?
command = "sqlite3 filename.sql <<SQL_ENTRY"
command = command "\nline1 of SQL ..."
...
command = command "\nlastline of SQL ..."
command = command "\nSQL_ENTRY"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top