Random snippets of unix/linux and sometimes windows.
Thursday, November 1, 2012
old systems without sed inplace editing.
I have a habit of using sed to in place edit files. But, here is a quick way to inplace edit a file using perl instead if you come across a system with an older version of sed.
perl -pi -e 's/\n/\r\n/g'
Example above is changing linux to windows line endings. This came about during my previous post of using base64 to attach ascii text files.
No comments:
Post a Comment