Re: Quick fix + reliable editor?
On Wed, 23 Dec 1998 13:15:37 GMT, Martin Wheeler wrote:
>
> Can anyone help me with a quick fix?
>
> For various inane reasons, I'm demonstrating the possibility of using
> multiple, mutually-inclusive mail-readers under Linux -- mail, mailx, elm,
> pine, mutt, tkmail, exmh, etc.
>
> So far, so good; except that yesterday I demonstrated exmh without first
> making a copy of my mailbox file (/var/spool/mail/<user>). So exmh has now
> taken 2500+ mail messages and converted them into separate files, which I
> somehow very quickly have to get back into a monobloc form in mailbox
> readable format (i.e chained together with an extra <cr> added between
> each -- and I don't know of any way to do this using cat or more/less).
> Anyome got a handy sed/awk/perl script to do this; or any any other
> quick-fix suggestion?
I think formail (from procmail) breaks it up, I don't know what puts it
back together. Maybe you could use a for loop.
$ ls > filelist
$ touch newfile
------------------------
#!/bin/bash
for i in `cat filelist`
do
cat $i >> newfile
echo "<cr>" >> newfile
done
-----------------------
I tested this and it worked, but I don't have any mailbox format to
compare against. I'm sure more artful code exists.
> Second query (related; but not urgent): does anyone know of a _known_
> reliable large-file text editor? One which will handle 10, 15, 25 Mb text
> files without hiccup, doing search-&-replace on the whole file without
> barfing, screwing up the file, etc.? (Something like Programmer's File
> Editor, but running under Linux). It must be known to be reliable -- i.e.
> tried and trusted in real-life experience, not just "this should do the
> job". (I've been caught like that before! :(
XEmacs has worked pretty well for me. I haven't done a lot of testing
with files of that size, although I have done some. I've also used vi
and even pico on files of that size, and they also worked well. I
think PFE emulates Brief, and I think XEmacs (and Emacs) has Brief
emulation as well.
--
David
----------------------------------------------------------------------
dstern@u.washington.edu
Reply to: