RE: [SLE] editor for extremely large test file {Solved}

From: James D. Parra (Jamesp_at_MusicReports.com)
Date: 05/11/05

  • Next message: Brad Bourn: "Re: [SLE] Dual Head Video Card Recommendations?"
    To: suse-linux-e@suse.com
    Date: Wed, 11 May 2005 08:19:04 -0700
    
    

    On 5/11/05, Colin Carter <colincarter@exemail.com.au> 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.

    Thank you all for your help.

    The problem I was having was in locating the last line number of the block I
    needed. I needed to grep for "\.", but grep was not interpreting that
    correctly. However, since I knew the first line number of the line number I
    needed I made a few guesses as to where the last line would be and I did
    eventually find it. The block of text I needed was 300Mb in size. I used
    "head" and "tail" to verify the start and end points for the new text file.

    Thank you, Anders, for your sed examples. They worked perfectly.

    Truly indebted,

    ~James

    -- 
    Check the headers for your unsubscription address
    For additional commands send e-mail to suse-linux-e-help@suse.com
    Also check the archives at http://lists.suse.com
    Please read the FAQs: suse-linux-e-faq@suse.com
    

  • Next message: Brad Bourn: "Re: [SLE] Dual Head Video Card Recommendations?"

    Relevant Pages

    • Re: Lost formatting in browser view source
      ... At the same time your html pages without php-code are processed by php. ... If you are concerned about users links and bookmarks to break, you have the nice option in apache to rewrite rules, if they try to load a "missing" html page, redirect them to a php file with the same name. ... run your editor, load 100 pages, use find/replace to change the address ...
      (alt.php)
    • Re: Getting Started in Lisp.
      ... Since I do tend to keep one or more editor windows open on source ... (LOAD* files...) ... from the editor windowto the REPL. ... recompile/reload. ...
      (comp.lang.lisp)
    • Re: GUI front-end archiver
      ... >> front of a computer while it is doing backups. ... use Emacs or vi to prune the list. ... "grep" before firing up the editor.) ... a powerful and convenient editor (i.e. Emacs and/or vi or their ...
      (comp.os.linux.misc)
    • Re: Converting excel to text file - Issue with wrapping text
      ... Are you sure the program to which you want to load this data cannot be ... I think you might neet to use a different text editor. ... > If i use tab delimited type, the original column spacing is not ... > If you would know of any other format which if i use while saving the ...
      (microsoft.public.excel.misc)
    • Hardware 3D Support
      ... Load "dbe" ... But the output of "$ glxinfo | grep rendering" is: ... Linux agpgart interface v0.101 Dave Jones ... $ dmesg | grep drm ...
      (Debian-User)