-H, --with-filename print file name with output lines -h, --no-filename suppress the file name prefix on output --label=LABEL use LABEL as the standard input file name prefix -o, --only-matching show only the part of a line matching PATTERN -q, --quiet, --silent suppress all no...
仅显示文件名(Show Only File Names) Normally grep will show filenames and the lines that match. We can list only filenames by using-loption. In the following example, we will list the files that contain the termThis. 通常,grep将显示文件名和匹配的行。 我们可以使用-l选项仅列出文件名。 ...
line-H,--with-filename print the file name for each match-h,--no-filename suppress the file name prefix on output--label=LABEL use LABEL as the standard input file name prefix-o,--only-matching show only the part of a line matching PATTERN-q,--quiet, --silent suppress all normal o...
--line-number print line numberwithoutput lines--line-buffered flush output on every line-H,--with-filename print the file nameforeach match-h,--no-filename suppress the file name prefix on output--label=LABELuseLABELasthe standard input file name prefix-o,--...
--show-filename:在输出中包含文件名信息 --sorted-output:按照关键字进行排序输出,方便比对和筛选结果 --tty-only:只在标准输入设备(tty)上接受控制选项和参数,禁止在文件中使用 --options 选项时使用 --tty-only 选项。例如,当 grep 命令从标准输入读取数据时,禁止使用 --tty-only 选项。©...
--no-filename suppress the file name prefix on output--label=LABEL use LABEL as the standard input file name prefix-o,--only-matching show only the part of a line matching PATTERN-q,--quiet, --silent suppress all normal output--binary-files=TYPE assume that binary files are TYPE;TYPE...
--with-filename print file name with output lines-h, --no-filename suppress the file name prefix on output--label=LABEL use LABELasthe standard input file name prefix-o, --only-matching show only nonempty parts of lines that match-q, --quiet, --silent suppress all normal output--binar...
flush output on every line-H, --with-filename print the file name for each match-h, --no-filename suppress the file name prefix on output--label=LABEL use LABEL as the standard input file name prefix-o, --only-matching show only the part of a line matching PATTERN-q, --quiet, -...
输出控制:-m,--max-count=NUMNUM 次匹配后停止-b,--byte-offset 输出的同时打印字节偏移-n,--line-number 输出的同时打印行号--line-buffered 每行输出清空-H,--with-filename 为每一匹配项打印文件名-h,--no-filename 输出时不显示文件名前缀--label=LABEL 将LABEL 作为标准输入文件名前缀-o,--only-...