gawk -vFPAT='([^,]*)|("[^"]+")' -vOFS=, '{print $1","$2","$4","$7}' yourfile.csv
-vOVFS=,
part means use,
as a separator-vFPAT
allows your csv file to contain double quotes, which can contain,
which would confuse awk as a separator- why “gawk”? Not all OS’s awk has the
-vFPAT
capability. MacOS’s default awk doesn’t. Usebrew install gawk
to get yours.