Dear All ,
I have file1.txt contain values like the following:
----------
23
24
25
and I have shell script which has the following :
more file1.txt | awk '{print "select 'DUMP',CODE1||'|'||CODE2||'|'||CODE3 from CODE where CODE1='" $1 "';"}' > file2.sql
all I need is to have the following sql in the file2.sql
select 'DUMP',CODE1||'|'||CODE2||'|'||CODE3 from CODE where CODE1='23';
select 'DUMP',CODE1||'|'||CODE2||'|'||CODE3 from CODE where CODE1='24';
select 'DUMP',CODE1||'|'||CODE2||'|'||CODE3 from CODE where CODE1='25';
but I got error on the | and the DUMP string is look like 'DUMP' is look like DUMP with out single quotations
Please Advise , I believe that the problem in the ' and the | maybe it's a speacial charchters .
Best Regards.