Unix Shell - find a string in files

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > October 2006 > find a string in files





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author find a string in files
Gary Wessle

2006-10-28, 7:39 pm

Hi
$ grep -FHrn string /path/
will find occurrences of the string in files recursively, but will
also find "stringing" and "strings".
how can I limit it to only "string"

thanks
Stephan Grein

2006-10-28, 7:39 pm

Gary Wessle wrote:
> Hi
> $ grep -FHrn string /path/
> will find occurrences of the string in files recursively, but will
> also find "stringing" and "strings".
> how can I limit it to only "string"
>


grep -FHwire string /path/

> thanks


np

P.S.: It's called a word boundary.

HTH,
--
Stephan Grein, <stephan at stephan minus rockt dot de>
https://stephan-rockt.de
GnuPG-Key-ID: 0xF8C275D4
FingerPrint: 5B6F 134A 189B A24D 342B 0961 8D4B 0230 F8C2 75D4
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com