I copy and pasted files from finder, into a text file to get the names of the files in a certain directory to a text file. When I open the file the files from each directory are all the same line...
For example: I copy and pasted from the "Hats Directory":
A more simple way is using
tr -d '\r' < inputFile > outputFile to remove all the carriage return characters.