Hi,
is there an easy away to combine fields in awk? Specifically, I have lines like this:
1,2,some text
3,4,some text, but it has commas in it, annoyingly
I want to extract the two numbers as the first two fields, but then I want all of the text (commas and all) to be the third field. Is there a way to do that?
My basic awk call was like this:
awk -F\, '{print $1"|"$2"|"$3}' file.txt
Which works fine for the first line, but stops at the comma in the text on the second line.
Thanks!
Ben