Find the answer to your Linux question:
Results 1 to 2 of 2
I am relatively new to using awk. I have a file with 10 identical lines. The last field in each line is a numeric. I want to check each of ...
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    1

    awk help

    I am relatively new to using awk. I have a file with 10 identical lines. The last field in each line is a numeric. I want to check each of these lines and if the last field is greater than 500, I want to capture the line and send it in an e-mail. I know how to do this with a single line, but I don't know how to step through all 10 lines. Any help would be appreciated.

  2. #2
    Just Joined!
    Join Date
    Sep 2009
    Posts
    3

    Thumbs up grep out lines with value greater than 500

    Hi,
    You can perform the same with following syntax:

    awk -F" " ' $5 > 500 ' /file/path

    '$5 > 500' means 5th filed with value greater than 500

Posting Permissions

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