Amanda Babcock <[EMAIL PROTECTED]> wrote:
>On Wed, 3 May 2000, Sean McAfee wrote:
>>Allow me to suggest a much shorter alternative:
>>perl -i -pe 'tr/\015//d' file1 file2 ...
>Actually, the key part of Christian's script is even shorter:
>>> then cat $1 | tr -d "\015" > $1
>In other words, cat
On Wed, 3 May 2000, Sean McAfee wrote:
>Allow me to suggest a much shorter alternative:
>
>perl -i -pe 'tr/\015//d' file1 file2 ...
Actually, the key part of Christian's script is even shorter:
>> then cat $1 | tr -d "\015" > $1
In other words, cat file1 | tr -d "\015" > file2. I think this
"Christian MacAuley" <[EMAIL PROTECTED]> wrote:
>I wrote this script to get rid of the ghastly carriage returns in my DOS
>files on my FreeBSD system.
>===
>#!/usr/local/bin/tsh
>
>if test $# -eq 0
> then echo "You didn't enter a filename."
>elif test -f "$1"
> then cat $1 |
> The Quick'n'dirty way to do this in vi is as follows:
>
> 1. Open the dos text file in vi.
> vi dosfile.txt
> 2. Type the following:
> :%s/^M//g
> ...where you "compose" the ^M character by pressing Ctrl+v then Ctrl+m
> 3. Save the file:
> :w New.Unix.File.txt
If you have
I wrote this script to get rid of the ghastly carriage returns in my DOS
files on my FreeBSD system. I use it like this:
> nocr dosfile.txt
===
#!/usr/local/bin/tsh
if test $# -eq 0
then echo "You didn't enter a filename."
elif test -f "$1"
then cat $1 | tr -d "\015" >