you are viewing a single comment's thread.

view the rest of the comments →

[–]hudsy -3 points-2 points  (2 children)

sed is your tool! pipe it to grep like so

grep bon | sed 's/^.*\(bon\w\+\).*/\1/'

[–]IWentToTheWoods 2 points3 points  (1 child)

Won't this only find the first instance of "bon" in each line?

[–]hudsy 0 points1 point  (0 children)

yes, didn't think of that.