One, grep (abbreviated from globally search a Regular expression and print) is a powerful text-search tool that can use regular expressions to search for text and print matching lines. The grep family of Unix includes grep, egrep, and Fgrep
grep: The default support for basic regular expressions;Egrep: extended regular expression;Fgrep: Regular expressi
document as FileName
: R [FileName]
Reads the contents of the filename document below the line where the current cursor is located
: Set Nu
Show line numbers at the beginning of each line
: Set Nonu
Cancel line number
N1,N2 w [filename]
Save the contents of N1 to N2 as filename for this document
:! Command
Temporarily leave Vim to run a Linux command, for example:! Ls/home temporarily lists the files
#grep--color=auto-e "\650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6D/07/wKiom1VaIEmCEbL4AADVTW_Jxp0155.jpg "title=" 10.jpg "alt=" Wkiom1vaiemcebl4aadvtw_jxp0155.jpg "/>11. Find the number between 1-255 in the result of ifconfig command;#ifconfig | grep--color=auto-e "\650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6D/07/wKiom1VaIFOSpn54AAGiK_c0s-M957.jpg "title=" 11.jpg "alt=" Wkiom1vaifospn54aagik_c0s-m957.jpg "/>This article is from the "Pony Learning Record" blog, m
Tags: file processing 2-grepgrep Text Search Tool:grep [options] pattern [file ...] --Pattern Mode: string, Regular expressionMatches the target text row by line , based on the user-specified pattern, and prints the line to which it matches .Pattern Pattern: Filter conditions written by regular expression characters and text characters.650) this.width=650; "Src="
Before the project needs to write a pure JS text comparison tool, in this small series to share the code in the cloud Habitat Community Platform for everyone's reference, the algorithm needs to be optimized, this article is not good yet please forgive me.
First up Effect chart:
The code looks like this:
Save the source code in HTML format files can be run directly
The above code is the use of
to the last linevim +10 After entering the document, the cursor is positioned to line 10th 8. After opening a document with Vim, I want the cursor to jump to line 20th, what do I do? How do I jump to the last line? jump To line 20, enter 20G Last line, enter G 9. Vim when the document is opened, the default is not to display the line number, how do you let it display line number? : Set Nuafter Vim opens the document, I want to replace the first ' ABC ' in line 20-50 with ' EFG ' How to
WPS2005 provides a method of writing a manuscript to display the entire document on the manuscript. However, for Chinese teachers, perhaps this function is not perfect, because, in the editing of Chinese papers, do not need to be the whole paper is displayed as a manuscript, but only need to be part of the composition title as blank paper, in order to facilitate the statistical word count. In fact, to achieve this function, do not need to use the WPS Text
The Perl script batchreplace.pl can be used to bulk replace the text/code in the file. You can find files of the specified type in the specified directory and recursively check subdirectories, and copy the directory structure of the input file when you output the file.
Annex The Win32 application BatchReplace.exe is an executable program that is compiled from Perl scripts and can be executed without having to install the Perl runtime environment.
U
WPS2005 provides a method of writing a manuscript to display the entire document on the manuscript. However, for Chinese teachers, perhaps this function is not perfect, because, in the editing of Chinese papers, do not need to be the entire paper is displayed as a manuscript method, but only need to be part of the composition title as a blank manuscript, to facilitate the statistical words (Figure 1). In fact, to achieve this function, do not need to use the WPS
Label:In the actual project development process, we often encounter such a problem: the database table fields are named by the underscore method is designed, next is to create the table corresponding to the model class. If we follow the fields in the database table and then manually hit them again, the properties of the corresponding model class are generated. There seems to be nothing to manually create the model class in the case of fewer fields. If the field is more, it's a little time-consum
Egrep: Use an extended regular expression to build the pattern, which is equivalent to GREP-E Meta characters : Character Matching :. : Any single character []: Specify any single character in the range [^]: Any single character outside the specified range number of matches : *: Matches its preceding character any time ?: Match its preceding character 0 or 1 times+: Match its preceding character 1 or more times {m}: Matches M-Times {m,n}
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.