in reply to Line\nbreaks
in thread What is responsible for a
Of course, there's always perl:
perl -pi -e 's/\r//' file.txt # for windows to unix perl -pi -e 's/\n/\r\n/g' file.txt # for unix to windows
If you use this frequently under unix, you can alias it to something like:
alias w2u="perl -pi -e 's/\n/\r\n/g' "
Then you'll be able to just do w2u file every time you want to convert a file.
Please note: I haven't been able to check the unix to dos way as I don't have perl installed on my windows machine at home. Please let me know if it doesn't work.
|
|---|