[UFO Chicago] ls access to a dictionary?

Jesse Becker jesse_becker at yahoo.com
Sun Apr 17 13:16:27 CDT 2005


--- Brian Sobolak <brian at planetshwoop.com> wrote:
> #ls ?ni?
> Unix?
> #ls *ni?
> unix
> linux
> 
> etc etc
> 
> Anyone know if such a thing exists?

Umm.... "egrep"?

> egrep -iw '.ni.' /usr/share/dict/words
Enid
knit
snip
unit
UNIX
Unix

I won't paste the output for '.*ni.', since it's 155 lines
long.

So, the solution is to learn basic regexes, and write an
shell function for egrep:

function xword { 
  egrep -iw $1 /usr/share/dict/words
}




Jesse Becker
GPG-fingerprint:  BD00 7AA4 4483 AFCC 82D0  2720 0083 0931 9A2B 06A2


		
__________________________________ 
Do you Yahoo!? 
Plan great trips with Yahoo! Travel: Now over 17,000 guides!
http://travel.yahoo.com/p-travelguide



More information about the ufo mailing list