[techtalk] vi technique for dos2unix
Amanda Babcock
alb at quandary.org
Thu May 4 10:44:55 EST 2000
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 is shorter
than your perl solution.
The rest of the script was error-checking, which neither of the above
one-liners does.
Amanda
More information about the Techtalk
mailing list