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
Job One: organize regular expression BlogsJob Two: grep jobs (regular expressions and character processing)Target file/etc/passwd, using the grep command or Egrep1. All rows containing root are displayed:2. Output any rows that contain bash, and
Cut: Intercepting text-specific fieldsNAMECut-remove sections from all line of files-D,--delimiter=delim (Specify field delimiter, default is space)Use DELIM instead of the TAB for field delimiter-F,--fields=list (Specifies the field to
TR command: TR [option] set1 [Set2]Delete or replace characters in Set1In the text representation of this problem, the Windows system, \ r \ n is newline, and the Linux system, \ n is a line break.Win->linux:cat file|tr-d ' \ r ' >new fileLinux->win:
Find File LookupFind txt and PDF filesFind. \ (-name "*.txt"-o-name "*.pdf" \)-printFind files that start with all lettersFind. -name "[a-a]*"Find all non-txt text with negative parametersFind. ! -name "*.txt"-printSpecify the search depth to print
Personal Insights: I think the text processing commands in Linux the grep egrep fgrep command is just as easy as mastering grep because the other two are almost the same, and the difference is very good.grep Basic Use method:Using the method grep
1.awkawk is a powerful text analysis tool, with the search for grep and the editing of SED, which is especially powerful when it comes to analyzing data and generating reports. Awk is the equivalent of a programming language with a lot of its own
This article describes the most common tools for using the shell to process text under Linux:Find, grep, Xargs, Sort, uniq, tr, cut, paste, WC, sed, awk;The examples and parameters provided are the most commonly used and most practical.I use the
A About SEDUnlike a full-screen editor such as VI, SED is a non-interactive text editor that edits text files and standard input, which can come from keyboards, file redirects, strings, variables, and even text from pipelines. SED is the
Cat:concatenate text File Viewing toolCat [option] filename ...-N: Add numbers to the displayed lines of text-B: Non-empty line number-V: Show ^-E: Display line terminator $-T: Show tabs-A: Displays all the control characters-a=-vet-S: Compress
1, remove the label of the page, such as from Import beautifulrsoup predata=beautifulsoup (data,'html.parser'). Get_text ()2. Remove punctuation, etc., with regular expressions.Import RE#表示将data中的除了大小写字母之外的符号换成空格preData=re.sub (R'[^a-za-z]',' ,
grep, sed (stream editor), awk (report text generation)SED basic usage:Sed:stream EDitorLine Editor (full screen Editor: VI)SED: Mode spaceBy default, the source file is not edited, only the data in the pattern space is processed; Then, after
Sort effect and usage:Sort [-option] file nameNAMESort-sort lines of text files sort displaySort by default sorted by ASCA code table-N: Sort from small to large by value size-r: Sorted in descending order and can be used with-N.-T: Specifies the
echo Command:Function: Display textSyntax: Echo [-nee][string]Description: Echo will send the input string to standard output. The output strings are separated by white space characters, and a newline number is added at the end.Double quotes can
This article describes the most common tools for using the shell to process text under Linux:Find, grep, Xargs, Sort, uniq, tr, cut, paste, WC, sed, awk;The examples and parameters provided are the most commonly used and most practical.I use the
Many projects need to be rich text to add content, like news ah, tourist attractions and so on, need to use rich text to add data, but how I found on this side two questions1) How can I get the src image of a rich text?2) Background upload with a
Requirements: From the current Test_a03order table to extract the product specifications, deposit dataFirst Add a table fieldWe add these two fields in the table named Product_size,deposit later to update the contents of the two fields can be1 ALTER
grep (Grep:global search REgular expression and print out of the line) is used as a text search tool to print lines that match to each line according to its pattern. Where pattern is the filter condition written by the regular expression
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.