I need some linux advice/help please...

Discussion in 'OT Technology' started by poisonivvy, Oct 18, 2004.

  1. poisonivvy

    poisonivvy New Member

    Joined:
    Aug 8, 2003
    Messages:
    1,446
    Likes Received:
    0
    Location:
    Washington State
    I thought I would post in here, to see if anyone would respond, I know it's a homework forum type thing, but please!!!

    I'm almost done with my assignment, but am having problems with grep.
    I've got a text file with distances of runs in it.

    What happens,
    : 07-findPR 6.2

    it finds all the 6.2 miles and then finds the 26.20 (cause it has 6.2 miles in it also) and double counts. How can I tell grep to look for the exact amount of the command line argument??
    Right now I have, echo.....$(grep $1 ....file here... -c)

    Thanks a bunch. :hs:
     
  2. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    man pages are your friend.

     

Share This Page