I'm currently working with a fairly large csv
file that has 170 columns. I'd like to filter out three specific columns using awk
filtering and then export that file out, so that the exported file only contains 3 out of 170 columns.
gzcat filename.csv.gz | awk '$19=="ACCOUNT_MOBILE_NUMBER" || $26=="DEVICE_ADID_TYPE" || $27=="DEVICE_ADID"' | gzip > filename_FILTERED.csv.gz
Expected results: new exported file containing only those three columns and their corresponding values/rows
Actual results so far: new exported file is blank