![]() No match is output, but the file name that can be matched is output. (Note: It is opposite to the file name output by "-l) When a row in a file is matched, the file will not be searched down. No matching content is output, but the file name cannot be matched. The valid values of WHEN include: 'Never ', 'Always', and 'auto '. )Ĭolor the matched content and output it. If the "-v" option is specified, the number of unmatched rows is output. No longer outputs matched content, but outputs the number of matched rows. 'can match this row)Ģ.1.3 General Output Control (Control Output content) (Note: for example, if a row "abcde" and grep-x 'abc' cannot match this row, grep-x 'abcd. Select only the rows that match the entire row. 'can match the two words, but grep-W' fsta' cannot match any one) (Note: for example, the string "fstab (5)", grep-w 'fstab' or grep-W' fsta. All these characters are the word boundary separators used to filter words. A word may consist of letters, numbers, and underscores. Select only the rows that match the entire word accurately. Returns the matched result, that is, the row that does not match is selected. '-Y' is an obsolete option to maintain compatibility with earlier versions. Ignore the case sensitivity in PATTERN and the Case sensitivity in the input file. An empty FILE indicates that no pattern is specified, so no content is matched. This option can be specified multiple times. Specify the PATTERN here as the pattern to be matched. Output a short grep command line to help and exit.Ģ.1.2 Matching Control (Control Matching mode) There are several additional options to control which variant 'grep' match engine is used (Note: fgrep/grep/egrep ). There are a few options to be compatible with older grep versions. Short options specified by POSIX are explicitly labeled as convenient for POSIX portability programming. Long Options are all GNU extension options, even if they come from POSIX. 'grep'There are a large number of options available: some are in POSIX.2 and some are GNU extensions. You can specify 0 or multiple INPUT_FILE_NAMES.Ģ.1 Command-line Options (Command line Options) The specified PATTERN is visible only when "-e PATTERN" or "-f FILE" is not used. 'grep'The common syntax format of the command line is: grep OPTIONS PATTERN INPUT_FILE_NAMES Because the line breaks are also the delimiters of the pattern list, there is no way to match the line breaks in the text. If the last byte of the input file is not a line break, 'grep' will automatically add one. When a row can match, (default) the row will be copied to the standard output, or the output of other sequences will be generated based on the options you specify.Īlthough 'grep' is expected to match in the text line, it is not limited even if the size of an input line exceeds the available memory space, it can still match any string in a row. 'grep'Searches for rows that match the given pattern list in a given file. It is not the original content!Ģ.1.4 control the prefix of the output rowĢ.1.5 control the context of the output rowģ.3 backslash characters and special expressionsģ.6 comparison between basic and extended Regular Expressions You can add it for yourself to help you understand and explain it. There are several unavailable options that are not translated, but the original text is given for the integrity of the article.Ģ. This article is the info man translation, which is basically translated according to the original text. Grep command Chinese manual (info grep translation), grep Chinese manualġ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |