it-artikel:linux:grep-tipps-und-tricks
Differences
This shows you the differences between two versions of the page.
— | it-artikel:linux:grep-tipps-und-tricks [2022-08-31 12:30] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== GREP - Tipps und Tricks ====== | ||
+ | |||
+ | * Suchen " | ||
+ | grep -e XXX -e YYY | ||
+ | </ | ||
+ | |||
+ | |||
+ | * Nach XXX bzw xxx suchen (nicht Case-Sensitive) < | ||
+ | grep -i XxX | ||
+ | </ | ||
+ | |||
+ | * Alles ausgeben das NICHT YYY der yyy enthält (nicht Case-Sensitive dank -i )< | ||
+ | grep -i -v YyY | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | * Suchen nach mehreren Schlüsselworten (nicht case-sensitive) und anschließendem ausschluss bestimmter anderer Schlüsselworte< | ||
+ | grep -i -e xxx -e YYY | grep -i -v -e aaa -e bbb | ||
+ | </ | ||
+ | |||
+ | * Sucht in einer Datei nach dem Schlüsselwort ' | ||
+ | grep -i error -n -A 5 -B 5 get-novell-files-now.sh.log | ||
+ | </ | ||
+ | |||
+ | --- // |