Once upon a time Caroline Seawright shaped the electrons to say...
Yes. I use vi. I always use vi for anything that has anything to do with
my web page.
I knew I liked you for a reason. ;-) Ok, this is just one of them...
Downloading things to my computer, editing them, uploading them, getting
rid of all the ^M characters, etc, is rather tedious.
I can't take credit for this, a co-worked at my last job had this laying
about when I was looking for one.
---cut---
#!/usr/local/bin/perl
# m2j - turn ^M to ^J to convert PC files to a form pleasing unto UNIX
#To turn ^M to ^J in all the files under foo, do
#find foo -type f -print | xargs m2j
# Author: 96/6/18 Carl Rigney cdr@livingston.com
for $FILE (@ARGV) {
$FILEBAK = $FILE.'.bak';
rename($FILE,$FILEBAK) || die "$0: unable to rename $FILE to $FILEBAK; $!\n";
open(FILEOLD,'<'.$FILEBAK) || die "$0: unable to read $FILEBAK; $!\n";
open(FILENEW,'>'.$FILE) || die "$0: unable to write to $FILE; $!\n";
while (<FILEOLD>) {
s/\015/\012/g;
print FILENEW $_;
}
close(FILEOLD);
close(FILENEW);
}
---cut---
I'll only ever use Word or something for spell checking. I'll download the
Can vi hook into ispell? That's one of the things I like about emacs:
M-x ispell-buffer. You can also run 'ispell' from the command line - if
it is installed.
-MZ