Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • If there are 2 or more lines with /path/foo/XX, grep will pick them up too. You probably need grep -f <(awk '{print "^" $1 "[[:blank:]]"} ... Commented Oct 13, 2015 at 12:47
  • @glennjackman: Well, good point. But don't use -F also break if X contain meta characters. Commented Oct 13, 2015 at 12:51
  • seems that grep isn't a good fit for this question. Commented Oct 13, 2015 at 13:20
  • @glennjackman: Append a space to the end of 1st field can prevent X and XX case. Commented Oct 13, 2015 at 13:25
  • still doesn't anchor it to the start of the line, but that does not appear to be a problem given the sample input. Commented Oct 13, 2015 at 13:29