ファイル中の文字列を部分一致で検索するのが基本的な使い方
grep <string> <path|file>例えば、filedir以下からorangeを含むテキストを見つけるには以下のようにする
grep orange filedir/*ファイル中の文字列を部分一致で検索するのが基本的な使い方
grep <string> <path|file>例えば、filedir以下からorangeを含むテキストを見つけるには以下のようにする
grep orange filedir/*| grep -e <regex> <path|file> |
| grep -E <regex> <path|file> |
| grep <string1> <path|file> | grep <string2> |
| grep -e <regex1> -e <regex2> <path|file> |
| grep -v <string> <path|file> |
| grep -r <string> <path> |
| grep --include="*.<ext>" <string> <path> |
| grep -n <string> <path|file> |
| grep -r <string> --exclude-dir={<dir1>,<dir2>} |