bash - Get the matches only if the substring is not part of a string -
hello looking string substring of string. using grep matches of string, matches of other string coming up.
grep -nr 'xml' .
when this, matches string "libxmlx" coming up. there way matches of xml , no libxmlx??
i newbie shell scripting, how proceed this?
from manual
the symbols \< , \> respectively match empty string @ beginning , end of word.
so,
grep -nr '\<xml\>' .
Comments
Post a Comment