Hallo, ich versuch unterhalb eines verzeichnisses alle dateien zu druchsuchen, in denen "*glib" vorkommt, aber nicht "*glib*", also nicht zum Beispiel "glibc" oder "virtual/glibc", wohl aber "virtual/glib" oder auch nur "glib". Vorzugsweise sogar nur "glib", wenn nur ein sonderzeichen davorsteht (also nicht "abglib", wohl aber eben besagtes "dev-libs/glib").
Wie gehe ich das an, grep -r scheint das nicht zu können.
grep: teilstrings suchen
Re: grep: teilstrings suchen
man grep:<blockquote><pre><font size="1" face="">code:</font><hr><font face="Courier New" size="2">-w, --word-regexp
Select only those lines containing matches that form whole words. The test is that the matching substring must
either be at the beginning of the line, or preceded by a non-word constituent character. Similarly, it must be
either at the end of the line or followed by a non-word constituent character. Word-constituent characters are
letters, digits, and the underscore.</font><hr></pre></blockquote>meinst du das?
Select only those lines containing matches that form whole words. The test is that the matching substring must
either be at the beginning of the line, or preceded by a non-word constituent character. Similarly, it must be
either at the end of the line or followed by a non-word constituent character. Word-constituent characters are
letters, digits, and the underscore.</font><hr></pre></blockquote>meinst du das?
Re: grep: teilstrings suchen
find $PATH -iname glib
findet alle dateien namens glib unterhalb $PATH
findet alle dateien namens glib unterhalb $PATH
Re: grep: teilstrings suchen
> alle dateien zu druchsuchen, in denen "*glib" vorkommt
ach so, er meinte "...in deren DATEINAMEN....". sorry, hab nicht genau gelesen. ich hatte es wörtlich genommen. grrrr, dass die leute ihre fragen aber auch nicht klarer formulieren können....
ach so, er meinte "...in deren DATEINAMEN....". sorry, hab nicht genau gelesen. ich hatte es wörtlich genommen. grrrr, dass die leute ihre fragen aber auch nicht klarer formulieren können....