What's Doing

Twitter Updates for 2008-05-09

Posted on May 9, 2008

- @brunns: s/^V^M// [#](http://twitter.com/andy47/statuses/807131453)

- Lazyweb - how do I write a Python function that accepts either a filename or a file object? [#](http://twitter.com/andy47/statuses/807131819)

- @brunns: If it's a one off just open the file in vim and type ':set fileformat=unix' [#](http://twitter.com/andy47/statuses/807134955)

<li>@brunns: Did you type <ctrl-V><ctrl-M>? [#](http://twitter.com/andy47/statuses/807136902)</li>
- @brunns Well, the way I've done it is to remove the extra ctrl-M at the end of each line, when you use it in sed you have to escape it [#](http://twitter.com/andy47/statuses/807140444)

<li>@brunns forget sed, try this - tr -d '\r' < dos_file.txt > amended_file.txt [#](http://twitter.com/andy47/statuses/807144377)</li>

Powered by Twitter Tools.