Hi Guys,
I am trying to format my csv file. When I spool the file using sqlplus the single row output is wrapped on three lines.
Somehow I managed to format that file and finally i am trying to make the multiple line on single line.
The below command is working fine but I need to pass the DBNAME as dynamic variable in shell script ... I tried this but it is not working any help ?
sed ':a;N;/\n\"ORCL \"/!s/\n/ /;ta;P;D' infile.csv
I need to pass the DB name ORCL as dyanamic variable
export DBNAME=ORCL
sed ':a;N;/\n\"$DBNAME \"/!s/\n/ /;ta;P;D' infile.csv
- but this is not working
---------- Post updated at 09:23 AM ---------- Previous update was at 09:11 AM ----------
i have tried like this also ... not working the output is below
+ sed ':a;N;/\n\"{$DBNAME} \"/!s/\n/ /;ta;P;D' infile.csv