1

Using awk to find sentences.

view story
linux-howto

http://www.unix.com – I am trying to print out sentences that meets a regular expression in awk (I’m open to using other tools, too). I got the regular expression I want to use, Code: "([^)(]\+ [0-9]\{4\})" from user ripat in a grep forum. Unfortunately with grep I couldn't print only the sentence. While searching for awk solutions as suggested I came across this: filtering - How to print out a specific field in AWK? - Stack Overflow which states “ Code: awk '/word1/' will print out the whole sentence" I also looked else-were including the man page for direct sentence retri (HowTos)