Hi,

You have to learn about regular expressions. Then you'll come up with something
like :

grep "^dog$" /usr/share/dict/words

Cheers,

Romain


Selon Erin Hodgess <[EMAIL PROTECTED]>:

> Dear R People:
>
> I want to use the "grep" command in UNIX/Linux to check
> some words from the dictionary.
>
> Let's say I use:
>
> grep dog /usr/share/dict/words
>
> and I get back
>
> bulldog
> dog
> dogged
>
> and so on.
>
> How could I just get back "dog" with the grep command please?
>
> Thanks,
> Sincerely
> Erin Hodgess
> Associate Professor
> Department of Computer and Mathematical Sciences
> University of Houston - Downtown
> mailto: [EMAIL PROTECTED]
>
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to