I have some files from Windows here in my NEW ArchLinux box :-) I'd like ask you, if it's possible to convert these files in one step (whole dir) to use LF at the end of line. Thank you for answer.
My ArchLinux Box: Zotac MiniPC, Intel Atom D525, OCZ Agility 2 SSD 40GB, 4GB Patriot RAM, Openbox
windows lineendings is CRLF (rn). Remove all CR's (leaving just the LF, the uniz endline) with
tr -d 'r' < "inputfile" > "outputfile"
So, in a loop for all files in directory:
for f in *.txt do tr -d'r' < "$f" > "$f" done
This is written on windows box at work, so try it out on one file before running the loop!
extra/hd2u 1.0.0-1 dos2unix is filter used to convert plain texts from DOS (CR/LF) format to UNIX format (CR) and vice versa.