When I was stuck in the fill-in-the-blanks activity "l___f___l___k___", I used Perl, and it solved my problem.
It is a one-liner in the command line:
Code:
[SpaceMan@sm-laptop ~]$ perl -e "/^l.+f.+l.+k.+$/ and print while <>" /usr/share/dict/words
life-like
lifelike
lifelikeness
lofty-looking
[SpaceMan@sm-laptop ~]$
and the answer is lifelike.
Here is the line-by-line walkthrough,
Code:
perl # perl interpreter
-e # execute code in the next argument
"
/^l.+f.+l.+k.+$/ # find words that match the blank
and print # and print matches
while <> # look through the lines of ARGV[0..n]
"
/usr/share/dict/words # pass the dictionary file
and last time, I used Perl to find rhyming words.