awk split a csv file based on column value code example
Example: awk split a csv file based on column value
awk -F, '{outfile=($1 ".csv") ; print substr($0,index($0,$2)) >>outfile ; close(outfile)}' <name_of_input_file
awk -F, '{outfile=($1 ".csv") ; print substr($0,index($0,$2)) >>outfile ; close(outfile)}' <name_of_input_file