Suffix fix

| 1 TrackBack

My friend Ben tweeted the following:

{squal,stup,ranc,tep,rig,cal,sap,vap,torp,fulg,fet,splend,turg,alg,liv,sord,val,horr,langu,pall,cand,ferv,perferv,hum}{or,id}

These are sets of prefixes and suffixes that expand to English words (squalor, squalid, stupor, stupid…). Inspired and curious, I wrote a short script to generate more of these:

[adam@Adam-Hahns-MacBook:~]$ ./suffix.py or id /usr/share/dict/words 
{cand,ranc,splend,flu,am,ac,perferv,horr,uncand,tab,ferv,tep,rig,sap,stup,val,marc,fet,tim,liv,torp,muc,alg,vap,squal,product,flav,fulg,hum,bo,sord,liqu,tum,langu,man,b,d,g,f,m,n,t,cal,turg,pall}{or,id}
[adam@Adam-Hahns-MacBook:~]$ !!|wc -c
./suffix.py or id /usr/share/dict/words|wc -c
     203

Uh-oh, my script generated more than Ben’s grepping! Granted, not all of them would fit in a tweet, so I’ll have to forgive him. What other fun can we have?

[adam@Adam-Hahns-MacBook:~]$ ./suffix.py a e i o u /usr/share/dict/words 
{to,ta,m,t,n}{a,i,e,u,o}
[adam@Adam-Hahns-MacBook:~]$ ./suffix.py ly tty /usr/share/dict/words
{be,unwi,co,pu,sca,wi,pa,po}{tty,ly}

Ben also informed me of a neat shell trick!

[adam@Adam-Hahns-MacBook:~]$ echo {be,unwi,co,pu,sca,wi,pa,po}{tty,ly}
betty bely unwitty unwily cotty coly putty puly scatty scaly witty wily patty paly potty poly

If you’re interested, here’s the source of suffix.py:

1 TrackBack

TrackBack URL: http://tr.ashcan.org/mt/mt-tb.cgi/218

ニューバランス 574 グレー from ニューバランス 574 グレー on August 21, 2014 8:28 AM

He arrived in a very white Bentley and partied alongside promoter Alex Gidewon plus V103 Kenny Burns. Read More