Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

finding words which only end in ???

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
if I had a list of words (one word per line) and wanted to find only the words which end in say 'ing' how would I go about it?

grep ing /usr/dict/words | awk ????????????

possible?
 
sorry figure it out with sed...

grep ing /usr/share/dict/words | sed 's/[ing\t]*$/ing/' | more

:)
 
In the awk method it is:

cat /usr/dict/words | awk '/ing$/ {print}'

Use piping out of awk or redirect into a file as req'd.

Jesse


flogrr
flogr@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top