What to add header line as the first line to a file created from a sql(oracle) file.
The sql file output(output.txt) is as follows;
REV|23453253||TEST TEST|DUMP NE23 5SD
REV|23454345|2|TEST TEST|TEST NE49
The header line I was trying to add is
"3P_CREDITORS" "5" "" "31-OCT-2008"
which is in another file(input file). I was trying like
head -1 inputfile.dat >> output.txt
understanably addes to the end.
REV|23453253||TEST TEST|DUMP NE23 5SD
REV|23454345|2|TEST TEST|TEST NE49
"3P_CREDITORS" "5" "" "31-OCT-2008"
I want it as
"3P_CREDITORS" "5" "" "31-OCT-2008"
REV|23453253||TEST TEST|DUMP NE23 5SD
REV|23454345|2|TEST TEST|TEST NE49
I want the head command to work on top.
For those who want to know how I create the output file(output.txt) I am using the sql script and I spool from the sqlplus to get the output file.
The sql file output(output.txt) is as follows;
REV|23453253||TEST TEST|DUMP NE23 5SD
REV|23454345|2|TEST TEST|TEST NE49
The header line I was trying to add is
"3P_CREDITORS" "5" "" "31-OCT-2008"
which is in another file(input file). I was trying like
head -1 inputfile.dat >> output.txt
understanably addes to the end.
REV|23453253||TEST TEST|DUMP NE23 5SD
REV|23454345|2|TEST TEST|TEST NE49
"3P_CREDITORS" "5" "" "31-OCT-2008"
I want it as
"3P_CREDITORS" "5" "" "31-OCT-2008"
REV|23453253||TEST TEST|DUMP NE23 5SD
REV|23454345|2|TEST TEST|TEST NE49
I want the head command to work on top.
For those who want to know how I create the output file(output.txt) I am using the sql script and I spool from the sqlplus to get the output file.