A practical example: in awk, the database is connected through the system call and a select operation is made, and the Where condition in the SELECT statement comes from the first domain ($) of a file.Cat file 1001100210031004 ...1. Use awk to
Awk 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. To put it simply, awk reads the file line-by-row, using spaces as the default
The difference between "" (double quotation marks) and "(single quote) You hit the keyboard behind the shell prompt, and until you press ENTER, the text you typed is command line, and the shell executes the command you submitted in a process
It happens that you want to generate a section of SQL script in awk, so it involves printing a single quote in a statement.EG1: When the string is echo AAA | awk ' {print ' select * from A where name= '/' TOM '/' "} 'EG2: When for a field echo TOM |
Recall a thing: Before using Linux to find Chinese input method, in Baidu entered the FCITX, and then the result has a, you are looking for is not: satirical Tencent. Originally can not remember this input method name, but later brother remember
SSH "PS aux | grep keyword | grep-V grep | awk '{print \ $2}' | xargs kill"SSH can remotely execute commands. The format is also very simple. After the command, add the command you want to execute in "" or.The intuitive feeling is:SSH "awk '{print $2
Work in common to shell scripts, encountered a doubt, solve.A common explanation:Single-Quote String restrictions:
Any character in a single quotation mark is output as is, and the variable in the single-quote string is not valid;
A
The following features are required for this article: a folder that has a folder that is named by a numeric number requires the deletion of files other than the maximum encoding.Specific implementationGeneral idea: Loop through all the files in the
In view of the non-persistent and capacity constraints of the memory, an effective data processing tool must be able to use external data: be able to obtain a large amount of data from the outside, and be able to save the processing results. R
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.