-L, --files-without-match print only names of FILEs containing no match -l, --files-with-matches print only names of FILEs containing matches -c,--countprint only a count of matching lines per FILE -T, --initial-tabmaketabs line up(if needed)-Z,--nullprint0byte after FILE name Con...
ugrep option -u, --ungroup to not group multiple matches per line. This option displays a matched input line again for each additional pattern match on the line. This option is particularly useful with option -c to report the total number of pattern matches per file instead of the number ...
-L, --files-without-match print only names of FILEs containing no match -l, --files-with-matches print only names of FILEs containing matches -c, --count print only a count of matching lines per FILE -T, --initial-tab make tabs line up (if needed) -Z, --null print 0 byte after...
-f FILE, --file=FILE Obtain patterns from FILE, one per line. If this option is used multiple times or is combined with the -e (--regexp) option, search for all patterns given. The empty file contains zero patterns, and therefore matches nothing. -i, --ignore-case Ignore case dist...
-l, --files-with-matches print only names of FILEs containing matches -c, --count print only a count of matching lines per FILE -T, --initial-tab make tabs line up (if needed) -Z, --null print 0 byte after FILE name Context control: ...
-c, --count print only a count of matching lines per FILE 11:grep -A 10 error a.log 查看a.log文件中包含 error 字样的文本信息,且打印出匹配内容后的10行内容,注意:这种我常常用来查看错误日志的堆栈信息 -A, --after-context=NUM print NUM lines of trailing context ...
matchPATTERNwill be skipped.-L,--files-without-match print only namesofFILEs containing no match-l,--files-with-matches print only namesofFILEs containing matches-c,--count print only a countofmatching lines perFILE-T,--initial-tab make tabs lineup(ifneeded)-Z,--nullprint0byte afterFILE...
--version display version information and exit--help display this help text and exitOutputcontrol: // 输出控制-m,--max-count=NUM stop after NUM matches-b,--byte-offset print the byte offset with output lines-n,--line-number print line number with output lines--line-buffered flush output ...
-l --file-with-matches #列出文件内容符合指定的样式的文件名称。 -L --files-without-match #列出文件内容不符合指定的样式的文件名称。 -n --line-number #在显示符合样式的那一行之前,标示出该行的列数编号。 -q --quiet或--silent #不显示任何信息。
this help text and exitOutput control:-m,--max-count=NUM stop after NUM matches-b,--byte-offset print the byte offset with output lines-n,--line-number print line number with output lines--line-buffered flush output on every line-H,--with-filename print the file name for each match-...