1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HEAD v TAIL

Discussion in 'Suggestions' started by Steve Fabian, Jul 15, 2010.

  1. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    HEAD permits combining /N+x and /Nn, thus allowing to bypass the multiline
    header and then extracting the first few data lines of a file. TAIL does not
    offer the symmetric concept of extracting the last few data lines preceding
    the trailer. It would be useful for TAIL to accept a negative value /N-x, so
    that /N-x /N2 would report 2 lines, starting x lines before EOF.

    Examples:

    Assume file F has a 3-line header and 4-line trailer.
    The first line of data reported by (existing syntax):
    head /n+3 /n1 F
    The last line of data reported by new syntax:
    tail /n-5 /n1 F
    --
    Steve
     

Share This Page