Very easy question here:
I have a file that contains pipe-delimited data.
I need to insert a header record, without overwriting any data records. So, if the input file looks like this:
John Doe|123 Main St|New York|NY|10101
Jane Doe|456 Oak St|Chicago|IL|12345
I need the output file to contain this record:
Name|Address|City|State|Zip
So, the ouput file will look like this:
Name|Address|City|State|Zip
John Doe|123 Main St|New York|NY|10101
Jane Doe|456 Oak St|Chicago|IL|12345
Can I use nawk for this task? Or what do you think???
Thanks to all!
I have a file that contains pipe-delimited data.
I need to insert a header record, without overwriting any data records. So, if the input file looks like this:
John Doe|123 Main St|New York|NY|10101
Jane Doe|456 Oak St|Chicago|IL|12345
I need the output file to contain this record:
Name|Address|City|State|Zip
So, the ouput file will look like this:
Name|Address|City|State|Zip
John Doe|123 Main St|New York|NY|10101
Jane Doe|456 Oak St|Chicago|IL|12345
Can I use nawk for this task? Or what do you think???
Thanks to all!