Though there are some tools (e.g. dos2unix) available to convert
between DOS/Windows (\r\n) and Unix (\n) line endings, you'd
sometimes like to solve this rather simple task with tools
available on any linux box you connect to. So, here are some
examples - just pick the one that fits you best:
Windows to Unix:
#Shell perl -pe '$_=~s#\r\n#\n#' < windows.txt [> linux.txt] sed -r 's/\r$//' windows.txt [> linux.txt] #Vim :%s/\r$// :set ff=unix
#Shell perl -pe '$_=~s#\n#\r\n#' < linux.txt [> windows.txt] sed -r 's/$/\r/' linux.txt [> windows.txt] #Vim :set ff=dosDon't forget to save your file, when you're using vim.