Operating System: OSX Method: From the command line, so using sed, cut, gawk, although preferably no installing modules.
Essentially I am trying to take the first c
If Perl is an option:
perl -F, -lane 'print $F[0]' in.csv > out.txt
These command-line options are used:
-n loop around every line of the input file-l removes newlines before processing, and adds them back in afterwards -a autosplit mode – split input lines into the @F array. Defaults to splitting on whitespace. -e execute the perl code -F autosplit modifier, in this case splits on , @F is the array of words in each line, indexed starting with $F[0]