Re: [R] OT UNIX grep question

From: <francoisromain_at_free.fr>
Date: Thu 10 Aug 2006 - 18:04:11 EST

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 <hodgess@gator.dt.uh.edu>:

> 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: hodgess@gator.uhd.edu
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>



R-help@stat.math.ethz.ch 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. Received on Thu Aug 10 17:49:48 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 10 Aug 2006 - 18:23:28 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.