Re: find a string in files



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
.



Relevant Pages

  • Re: Vergleich auf Gleichheit
    ... Stephan Kraffert wrote: ... Hier musst du das Datum in einen vertsändlichen String umwandeln. ... Peter ...
    (microsoft.public.de.german.entwickler.dotnet.vb)
  • Re: String einer Form-Variablen zuweisen
    ... stephan sochor schrieb: ... Meine Hoffnung war, dass es so etwas wie in PHP oder Clipper gibt, wo man dem Interpreter mitteilen kann, das der Inhalt des Strings als Variable zu sehen ist. ... Dim fn as String ...
    (microsoft.public.de.access)
  • Re: Extracting a character from a string
    ... character from the string ... Is there something similiar I can do in kSH. ... Stephan Grein, ...
    (comp.unix.shell)
  • Re: find string in dir, tree
    ... I used this command to find all occurrences of "string" in a directory ... tree. ... $ grep -FHwire info->set. ...
    (comp.unix.shell)
  • Re: sed inplace substitution
    ... I want to replace a string with another string in a lot of files: ... Have the following which is halfway there: ... It does however write to std out and not do an in place substitution. ... Stephan Grein, ...
    (comp.unix.shell)