Thursday, February 7, 2013

Shell Script to Search Words in between Letters

In our example below.. It will display all the words that starts with letter "B" and ends with letter "D".

linux command:

wget -nv -O - "http://www.morewords.com/?=b*d" | awk '/word/' | awk '/class/' | awk 'sub(".........$", "")' | cut -b 1-31 --complement | rev | cut -d/ -f2- | rev

sample output:



baaed
babbitted
babbled
babied
babyhood
baccated
bached
bachelorhood
backbend
.
.
.
byword



Happy Scripting!



No comments:

Post a Comment