Setting in .bashrc
awk defaults to working with whitespace, not with commas, better ot set the comma as an field separator, and otuput field separator and name this modification awkc.
Add this to ~/.bashrc
# make a csv specific awk
alias awkc='awk -F, -v OFS=,'
Split a csv file into multiple files based on 7th column
awk -F',' 'NR==1{h=$0; next} {
f = $7 ".csv"
if (!(f in seen)) {
print h > f
seen[f]
}
print >> f
}' input.csv