6 Replies Latest reply on Feb 12, 2009 7:22 PM by robin521

    using grep to find one match per line

    Level 1
      Hi,

      How do you get grep to return a single line even when multiple matches are found on the same line?

      I tried the (?-m) and (?-s) without success.

      eg. searching for the string "sin" in the following line should return only one result not 2.

      SG SIN Singapore

      I don't want the search to stop after a single match, it should continue on successive lines

      Thanks,
      SB