On Fri, 8 Jul 2005, Joseph Alotta wrote:
On Jul 8, 2005, at 9:26 PM, Chris Devers wrote:
#!/bin/sh
perl -pi -e "tr/\r//d"
I tried to call perl directly. But this does not work
at all. Does anyone know why?
#!/usr/bin/env perl -pi -e "tr/\r//d"
See, I was only trying to save you a line. :-)
Yeah, but it doesn't really matter how complex the script is, so long as
you can just do a
$ dos2unix file.txt
and get back a clean result.
If I was going to make any modifications to the file, rather than
simplify it, I'd force it to quit rather than edit any binary file, as
$ dos2unix file.jpg
can be *really* disastrous the way it is now :-)
But if I cared *that* much, I'd just get dos2unix from Fink and be done
with it. As it is, I almost never use this script in the first place, so
leaving it as is works fine for me :-)
--
Chris Devers