I have numerous 2GB space-delimited files from a source system. Each row in each file contains the same number of strings surrounded by " as text qualifiers.
I need to eliminate the last two strings and their text qualifiers from every row in each file. (like removing the last two columns from a columnar report). With smaller files, I can import into Excel, delimit, delete the columns, save as tab delimited (much more useful than spaces).
Anycase, these files are too large and have too many rows for excel. So sed
??
"text1" "text2" "text3" "text4" "text5" "text6"
Every row has the same number of strings. How do I drop "text5" "text6" from every row?
awk '{$5=$6=""}1' file
... – jasonwryan May 18 '17 at 1:41awk 'NF=4'
– Thor May 18 '17 at 5:04