I am trying to make directories from a very simple text file list (folders.txt) that looks like this:
Homesteader_Droopy_1954
Car_of_Tomorrow_1951
Dixieland_Droopy_1954
Doggone_Tired_1949
Drag_A_Long_Droopy_1954
Droopys_Double_Trouble_1951
Using this command:
cat folders.txt | xargs mkdir
But it keeps spitting out an error that looks like this:
mkdir: Homesteader_Droopy_1954\rCar_of_Tomorrow_1951\rDixieland_Droopy_1954\rDoggone_Tired_1949\rDrag_A_Long_Droopy_1954\rDroopys_Double_Trouble_1951: File name too long
Any idea why it's adding a \r
at each new line, and how to get it to stop doing that, and just make the folders?
OS: Mac Catalina 10.15.7 - zsh 5.7.1