Mailinglist Archive: opensuse (3349 mails)

< Previous Next >
Re: [SLE] editor for extremely large test file
  • From: Greg Freemyer <greg.freemyer@xxxxxxxxx>
  • Date: Wed, 11 May 2005 09:19:42 -0400
  • Message-id: <87f94c370505110619106ebf92@xxxxxxxxxxxxxx>
On 5/11/05, Colin Carter <colincarter@xxxxxxxxxxxxxx> wrote:
> On Wednesday 11 May 2005 20:46, Damon Register wrote:
> > James D. Parra wrote:
> > > Thanks Anders. However, I don't know where the text I need is located in
> > > the file. I need an editor that can actually open this file so I can look
> > > for
> >
> > I am confused. When I was a kid my dad used to say "if you don't
> > know what you are looking for, how will you know when you find it?"
> > It seems you must know something about what you are looking for so
> > why can't the Anders recommended SED find that text? Putting the
> > size issue aside for a moment, why can't any editor find your text?
> > Even the simplest Notepad in Windows can search.
> >
> > Now I have a question about editors and big files. Does anyone remember
> > the PDP-8? Twenty years ago when I started work here, there were a lot
> > of PDP-8 word processors. They had a big 4K of RAM. When they opened
> > a file, they didn't load the whole thing, just the first piece. As the
> > user moved through the file, the computer would load the next piece.
> > Does SED or any other editor have this abililty to load only a portion
> > at a time? I could be wrong but it seems to me that this might be the
> > only way to deal with such a large file.
> Actually, doesn't emacs do that?

IIRC, sed stands for "stream editor", It is non-interactive. It is
typically used from shell scripts, or by gurus that have memorized its
rather complex command-line argument structure.

You can even put sed in a pipeline:
cat bigfile | sed AndersArgs > resulting_sub_section

So yes it works on files a little bit at a time. That is why Anders
recommended it I'm sure.

Greg
--
Greg Freemyer
The Norcross Group
Forensics for the 21st Century

< Previous Next >