Re: OT - DOS vs Linux text files?
> Highlighting and pasting from what I think is an origionally created in
> windows text file to a linux file produces successive lines that are indented
> across the screen. However when I create a file in linux and then highlight
> and paste into another file it works fine. I think the files that are
> giving me trouble are windows created because I see:
> "BlessedEquipment.html" [dos] 127L, 4640C written
> when I :w in vim. If the problem is they were created within windows then
> what is it I need to strip out of the files? Use perl to do it?
Hey Bill. Perl is exactly the tool to do this. I admin an environment catering
to Macs and this is the same thing. What you want to do is get the hex code
for the DOS CR/LF. (I think it's \x0D\x0A) and changed it to \n.
The script for this is:
$> perl -pi.old -e 's/\x0D\x0A/\n/g;' readme.txt
This will substitute newlines for CR/LF in readme.txt and create
readme.txt.old as a backup.
Lance Levsen, Programmer
PWGroup - S'toon.