shell script to extract contents of a file

Hi,
I am inserting two eyecatchers into a log file to track the logs in that period between the two. now i wnat to extract the contents between these eyecatchers. Can someone gve me the logic how it should be worked.
im stumped. Im trying to write a unix shell script(korn shell)
regards,
aj

Comments

  • : Hi,
    : I am inserting two eyecatchers into a log file to track the logs in that period between the two. now i wnat to extract the contents between these eyecatchers. Can someone gve me the logic how it should be worked.
    : im stumped. Im trying to write a unix shell script(korn shell)
    : regards,
    : aj
    :
    :
    say you have the logfile with a structure like:
    [code]
    ...
    START
    stuff to extract
    END
    ...
    [/code]

    do:
    [code]
    sed -n '/START/,/END/p' logfile
    [/code]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion