dos2unix Rewrite

Another commonly used UNIX utility that I decided to quickly re-write, for fun. Takes a files a strips all the \r characters out, returning a pure UNIX-endline based file. The resulting snippet can be found below:

print map{s/\r//g;$_}<>;

Posted: April 15th, 2004

Subscribe for email updates

Comments are closed.
Comments are automatically turned off two weeks after the original post. If you have a question concerning the content of this post, please feel free to contact me.

Secrets of the JavaScript Ninja

Secrets of the JS Ninja

Secret techniques of top JavaScript programmers. Published by Manning.

John Resig Twitter Updates

@jeresig / Mastodon

Infrequent, short, updates and links.