Where the input file (sorted text file) is mycsv.csv .perl -naF, -e '$F[0] eq $prev or close FIL,open FIL,qq|>>|, $F[0] . q +q|.txt|;print FIL $_;$prev=$F[0]' mycsv.csv
If you are on Windows, use double-quotes instead of single.
Update: Changed OPEN to APPEND instead of overwrite, which seems to be what the OP wants.
..to maintain is to slowly feel your soul, sanity and sentience ebb away as you become one with the Evil.
In reply to Re: Aggregating Lines from a CSV who lines match a particular field and save those matches based on that matching field name
by NetWallah
in thread Aggregating Lines from a CSV who lines match a particular field and save those matches based on that matching field name
by Knoperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |