User Tools

Site Tools


bash:files:dos2unix

BASH - Files - DOS2UNIX

Convert all DOS newlines (CR/LF) to UNIX format (CR).

This is the same as converting /r/n to /n.

Works when each line ends with ^M (Ctrl-M). Removes the ^M.

awk '{sub(/\r$/,"");print}' filename
bash/files/dos2unix.txt · Last modified: 2022/06/13 12:16 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki