iangodsell
Programmer
Hi,
I am trying to put together a one liner unix script to get the following output.
4,2,774,421
2,7,134
where the original records in a file filename.csv are
4,2,774,421,|3||||Destination|Error Demo|1|12 APR 2002
2,7,134,|1|Lookup Failure|Address_ID|7|Destination|Error Demo|1|12 APR 2002
The best I can get to is
4,2,774,421,
2,7,134,
using
cut -f 1 -d '|' filename.csv
As you can see though, the commas at the end are still there.
Thanks to all in advance.
Regards,
IanG.
I am trying to put together a one liner unix script to get the following output.
4,2,774,421
2,7,134
where the original records in a file filename.csv are
4,2,774,421,|3||||Destination|Error Demo|1|12 APR 2002
2,7,134,|1|Lookup Failure|Address_ID|7|Destination|Error Demo|1|12 APR 2002
The best I can get to is
4,2,774,421,
2,7,134,
using
cut -f 1 -d '|' filename.csv
As you can see though, the commas at the end are still there.
Thanks to all in advance.
Regards,
IanG.