Getting Started command 13-string lookup enhancement: findstr

Source: Internet
Author: User
Tags printable characters

Http://www.cnblogs.com/doupip/archive/2011/12/23/2299210.html

Look for the string in the file. FINDSTR [/b] [/E] [l] [/R] [/S] [/i] [/x] [/v] [/n] [/M] [/O] [/f:file] [/c:string] [/g:file] [/d:dir list] [/a:co  Lor attributes] [/off[line]] strings [[drive:][path]filename[...] /b starts pairing mode on a line. Beginning of a line/e pairing mode at the end of a line. End of a line/l uses the search string by Word. LITERALLY/R uses the search string as a generic expression.  Regular EXPRESSIONS/S searches the current directory, and all subdirectories, for a matching file that is subdirectories in both the existing and all directories. /I specifies that the search is not case-sensitive. Ignore case-sensitive/x prints exactly the rows that match. exactly/v only prints rows that do not contain matches. Invert-match is the inverse of match/n prints the number of lines before each line of the match. Prints the line number/m if the file contains a match, print only its file name.  A file contains a match. /o Prints the character offset before each matching line. Character offset/p ignores files that have non-printable characters.  Non-printable characters. /off[line] does not skip files with an offline property set.  Offline attribute set. /A:ATTR specifies a color attribute with a 16-digit number. See "Color/?"  Specifies color attribute with both hex digits. /f:file read the file list from the specified file (/on behalf of the console). Reads file list from the specified file/c:string uses the specified string as the literal search string. SpeciFied string as a literal search string (charactor)/g:file to get the searched strings from the specified file. (/On behalf of the console).  Gets search strings from the specified File/d:dir finds a semicolon-delimited list of directories listing the directories strings the text to look for. [Drive:] [path]filename Specifies the file to find. Unless the parameter has a/C prefix, use a space to separate the search string.  For example: ' FINDSTR ' Hello there ' x.y ' Look for "hello" or "there" in the file x.y. ' findstr/c: ' Hello there ' x.y ' file x.y look for "Hello there".        Quick reference for general expressions:. Wildcard: Any character * repetition: previous character or category occurrences 0 or more times ^ line position: Line start $ line position: end of line [class] character category: Any character in the character set [^class] complement character class Do not: Any character not in the character set [x-y] range: Any character within the specified range \x Escape: The literal usage of the metacharacters x \<xyz Word position: The beginning of the word xyz\> position: the end of the word about FIN Dstr the details of common expressions, see the Online command reference.

  

Getting Started command 13-string lookup enhancement: findstr

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.