Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    Los Angeles, CA
    Posts
    28

    Unanswered: Removing Trailer

    Is there an easy way in a shell script to remove the last line of a flat file?
    Basically I have a large file, 20,000+ lines with a trailer. I want to remove the trailer and only have the data left.

    Suggestions?

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    sed '$d' yourfile

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •