Saturday, November 24, 2018

[OSX] command line 'join' failed with DOS line end 0d0a


Ever frustrated how join command did not work on some file?

To get rid of the 0x0d from DOS .CSV file, i.e. make unix 0a ending, do

# note that ^M below is entered by CTRL-V CTRL-M 
$ sed 's/^M//' in.csv > out.csv

Labels: , , , , , ,