-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 is 'binary', 'text', or 'without-match' -a, --text equivalent to --binary-files=text -I equivalent to ...
--exclude-from=FILE files that match PATTERN in FILE will be skipped. -L, --files-without-match 匹配多个文件时,显示不匹配的文件名 -l, --files-with-matches 匹配多个文件时,显示匹配的文件名 -c, --count 显示匹配了多少次 -Z, --null print 0 byte after FILE name 文件控制: -B, --befor...
WORD - WORD consists of a sequence of non-blank characters, separated with white space. word - word consists of a sequence of letters, digits and underscores. Example to show the difference between WORD and word * 192.168.1.1 - single WORD * 192.168.1.1 - seven words. 6.1 显示匹配行之后...
-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-h,--no-filename suppress the file na...
-U, --binarydonot strip CR characters at EOL (MSDOS) -u, --unix-byte-offsets report offsetsasifCRs were not there (MSDOS) 二,准备测试文件test 查看复制打印? root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/bin/false,aaa,bbbb,cccc,aaaaaa ...
Both patterns and subject lines must be valid strings of UTF-8 characters. -V, --version Write the version numbers of pcregrep and the PCRE library that is being used to the standard error SunOS 5.11 Last change: 11 User Commands PCREGREP(1) stream. -v, --invert-match Invert the ...
如果类型TYPE是without-match,那么grep假定二进制文件不会匹配;这样做与-I选项等价。如果类型TYPE是text,那么grep将一个二进制文件视为文本文件来处理;它与-a选项等价。警告:grep --binary-files=text可能会输出二进制的无用内容。如果输出设备是一个终端,并且终端的驱动将这些输出中的一些当作命令,可能会带来恶劣的...
-o, --only-matching show only nonempty parts of lines that match -q, --quiet, --silent suppress all normal output --binary-files=TYPE assume that binary files are TYPE;TYPE is'binary','text', or'without-match'-a, --text equivalent to --binary-files=text ...
(这表示此档案有match之处,详见--binary-files=TYPE ) $ (正确!!!) $ grep -a panda mv 3. -B NUM,--before-context=NUM 与-A NUM 相对,但这此参数是显示除符合行之外 并显示在它之前的NUM行。 ex: (从file中搜寻有panda样式的行,并显示该行的前1行) ...
-U, --binary do not strip CR characters at EOL (MSDOS/Windows) -u, --unix-byte-offsets report offsets as if CRs were not there (MSDOS/Windows) ‘egrep’即‘grep -E’。‘fgrep’即‘grep -F’。 直接使用‘egrep’或是‘fgrep’均已不可行了。