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 Archie hardware: Screen: 29" LG 29UM58 Ultrawide - CPU: Intel Pentium G3258 - RAM: Crucial 4GB DDR3 1600MHz - HDD: ADATA Premier Pro SP900 128 GB - MB: Gigabyte H81n
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.