[HPADM] RE: Remove "N" lines of a file with "sed" ?

From: Abramson, Stuart (SAbramson_at_Wabtec.com)
Date: 12/11/03

  • Next message: Abramson, Stuart: "[HPADM] SUMMARY: Remove the first "N" lines of a file to "string" with " sed" ?"
    To: "Hpux-Admin (hpux-admin@dutchworks.nl)" <hpux-admin@dutchworks.nl>
    Date: Thu, 11 Dec 2003 12:22:42 -0500
    
    

    hpux-admins:
     
    I can't count lines. I don't know how many there will be, and the number
    could change. I have to key on the fact that the first line I want to keep
    is the
    "STARTUP" line.
     
        Stuart

      _____

    From: Nikiforuk, Kevin [mailto:knikifor@epcor.ca]
    Sent: Thursday, December 11, 2003 12:16 PM
    To: Abramson, Stuart
    Subject: RE: [HPADM] Remove "N" lines of a file with "sed" ?

    tail -n +N filename > filename.new
    cp filename.new filename

            -----Original Message-----
    From: hpux-admin-owner@DutchWorks.nl [SMTP:hpux-admin-owner@DutchWorks.nl]
    On Behalf Of Abramson, Stuart
    Sent: Thursday, December 11, 2003 10:09 AM
    To: Hpux-Admin (hpux-admin@dutchworks.nl)
    Subject: [HPADM] Remove "N" lines of a file with "sed" ?

            Below are the first "N" lines of an Oracle database control file.

            I want to delete the first "N" lines, from the beginning of the file
    down to the 2nd "***" line, and copy the rest of the file to a new file.

            I have to do it in a batch job. I would normally do these kinds of
    things with sed, but I can't quite figure out how.

            How do I do that?

                    Stuart
    -----------------------------------------------

            /u1001/app/oracle/admin/HOTB/udump/ora_4073_hotb.trc
    Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.4.0 - Production
    ORACLE_HOME = /u1001/app/oracle/product/8.1.7
    System name: HP-UX
    Node name: wcshps07
    Release: B.11.11
    Version: U
    Machine: 9000/800
    Instance name: HOTB
    Redo thread mounted by this instance: 1
    Oracle process number: 15
    Unix process pid: 4073, image: oracle@wcshps07 (TNS V1-V3)

            *** SESSION ID:(10.1971) 2003-12-11 12:00:18.278
    *** 2003-12-11 12:00:18.278
    STARTUP NOMOUNT
    CREATE CONTROLFILE REUSE DATABASE "HOTB" NORESETLOGS ARCHIVELOG
        MAXLOGFILES 16
        MAXLOGMEMBERS 2
        MAXDATAFILES 30
        MAXINSTANCES 1
    Stuart Abramson | Off: 412/825-1434 | Cell: 412/417-1567 | email:
    sabramson@wabtec.com

            ***** CONFIDENTIALITY NOTE *****
    The content contained in this e-mail transmission is legally privileged and
    confidential information intended only for the use of the individual or
    entity named herein. If the reader of this transmission is not the intended
    recipient, you are hereby notified that any dissemination, distribution, or
    copying of this transmission is strictly prohibited.

    ***** CONFIDENTIALITY NOTE *****
    The content contained in this e-mail transmission is legally privileged and confidential information intended only for the use of the individual or entity named herein. If the reader of this transmission is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this transmission is strictly prohibited.

    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    

  • Next message: Abramson, Stuart: "[HPADM] SUMMARY: Remove the first "N" lines of a file to "string" with " sed" ?"

    Relevant Pages

    • Re: Met Tristan HD
      ... the text and music - that patron should just shut the hell up and be glad ... Thank you for your email regarding our HD transmission of Wagner's Tristan ... Stage director Dieter Dorn's spare production, ... Although an engaging experience in the opera house, ...
      (rec.music.opera)
    • Re: Met Tristan HD
      ... the text and music - that patron should just shut the hell up and be glad ... Thank you for your email regarding our HD transmission of Wagner's Tristan ... Stage director Dieter Dorn's spare production, ... Although an engaging experience in the opera house, ...
      (rec.music.opera)