I. Text-processing Exercises1. Find all IPv4 address of native in ifconfig command result[Email protected] zhang]# ifconfig |tr-s "" |head-2 |tail-1| Cut-d ""-f32. Find out the maximum percentage value of partition space utilization[Email protected]
Tools for working with the text sedLine Editor:Sed is a stream editor that processes a single line of content at a time, and when processed, stores the currently processed rows in a temporary buffer, which we call "pattern space"The SED command is
3.1.1, Linux system files are composed of data and meta-data, special files without data such as: Device files. The device file contains two classes (character devices and block devices). A character device is also called a linear device, and a
1 * Copyright (c) Level 2012, Yantai University School of Computer Science2 * All rights reserved.3 * Pay Record Super4 * Completion Date: May 10, 20155 * Version number: v1.06 * Learning topic: Text Processing7 * Working environment: Red Hat 5.88 *
Linux text processing tool1. awkawk is a powerful text analysis tool. Compared with grep search and sed editing, awk is particularly powerful in data analysis and report generation. Awk is equivalent to a programming language and has many of its own
Python simple text processing method,
This article describes how to process python simple text. Share it with you for your reference. The details are as follows:
Due to the influence of multiple threads, the time sequence printed by c ++ projects is
Click the button to disable the button and display the text [processing...]. The getelementbyid button tag value is text, and the getelementbyid value is
[Reprinted with the source: lanmanck.net. csdn. blog]
If jquery is used on the Internet,
Basic Text Processing-the powerful sort command sort compares each row of a file as a unit. The comparison principle is to compare the lines following the first character by ASCII code value in sequence, finally, output them in ascending order (the
Linux Command Text Processing (2)
Cut commandWhen the cut command is used to operate the columns of a file, it can be regarded as a column editor. It corresponds to most "editors", such as sed, grep, and sort. When they operate on text, unit:
-: Common wildcards:*? []
*: Match any character of any length
? : Match any character
[]: Match any single character in the specified range
[^]: Delimiters, indicating inverse.
Ii. Regular Expression: Is a search and string replacement operation.
1. grep: global search Regular Expression and print out the line.
The text search tool performs a row-by-row search on the target file based on the user-specified text mode to display the rows that can be matched by the mode.
Format: grep [Option]
Linux text processing commands
SortCommand
The sort command sorts all rows in the file. The sort command has many very useful options, which were initially used to sort the file content in the database format. In fact, the sort command can be
The crs_stat-T command shows that the resource name is incomplete, as shown below:
[[email protected] shell]$ crs_stat -tName Type Target State Host ------------------------------------------------------------ora....
For a long time did not write technical articles, 4 o'clock tomorrow morning also to climb up to catch the plane, feel the pit is necessary to record, to comfort their fragile soul. Monday and Tuesday busy 2 days to solve this problem, the middle
For a text string, you can use the Python String.Split () method to cut it. Let's look at the actual running effect.' The best book on python! ' print mysent.split ()Output: [ " this ' , ' book ' , ' is ' , ' the ' , ' best ' , '
The role of grep: search for text according to the specified pattern, displaying the lines of text that match toSyntax format: grep "PATTERN" filePattern is a regular expression, and grep is generally used in conjunction with regular expressions, so
grep (Global Regular Expression print)How to use:grep [options] pattern [file1 file2 ...]make with parameters: [options] Main parameters: - C : Counts the number of matching rows (count)- N : Displays matching lines and line numbers
Sort classification OperationsSample filesBoys in company c:hk:192:2192alien:hk:119:1982The hill:kl:63:2972aliens:hk:532:4892Star wars:hk:301:4102A Few Good men:kl:445:5851Toy story:hk:239:3972The command format for sort is: Sort-cmu-o output_file
grep is used for keyword search text -I ignores case when searching -n Displays the number of rows in the result -V output row with no keyword -ax the specified number of rows after the row of the result is included in the output - BX when the
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.