Re: Spellcheck a list
Re: Spellcheck a list
- Subject: Re: Spellcheck a list
- From: Jean-Baptiste LE STANG <email@hidden>
- Date: Tue, 5 Oct 2004 18:34:42 +0200
There is a protocol (RFC 2229 ftp://ftp.isi.edu/in-notes/rfc2229.txt)
that proposes a service for definitions, spelling, and many other
things, have a look to the following :
do shell script "curl dict://dict.org/d:applescript"
Le 5 oct. 04, à 14:28, Graff a écrit :
On Oct 5, 2004, at 5:08 AM, Dennis W. Manasco wrote:
At 12:07 pm -0400 10/4/04, Graff wrote:
I did use a regular expression. I added the start-of-line marker "^"
and the end-of-line marker "$" to the string before I quoted it. I
did this so that I would get only unique matches rather than any
line that contained the string. For example:
using:
grep '^youth$' /usr/share/dict/words
gives me:
youth
using:
fgrep 'youth' /usr/share/dict/words
gives me:
overyouthful
preyouthful
...
...
using:
fgrep -iw 'youth' /usr/share/dict/words
gives only:
youth
(OMM)
(See 'man fgrep' in Terminal.)
Yeah, I just noticed that this works in the same way:
fgrep -x 'youth' /usr/share/dict/words
The -x option makes sure that the string is the only thing on the
line, basically the same thing as adding the beginning-of-line and
end-of-line markers. It's a bit better than -w because -w looks for
individual words. If the file has two words on a line and one matches
then you'll get the whole line. The file '/usr/share/dict/web2a' has
multiple words per line so you might not get exact matches if you used
-w on it.
One of the headaches of command-line tools is noticing and
understanding all of the options available to you! Some of the tools
are so powerful if you can understand all of the things they do.
- Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden