] ~]# sed ' s#toby#tobygirl#g ' tobyedu.txtI am Tobygirl teacher!I like badminton ball, billiard ball and Chinese chess!Our site is tobygirledu.comMy QQ num is 12345678.5. Replace all Toby strings in the file with Tobygirl and replace QQ number 12345678 with 87654321[Email protected] ~]# sed-e ' s#toby#tobygirl#g ' tobyedu.txt-e ' s#12345678#87654321#g 'I am Tobygirl teacher!I like badminton ball, billiard ball and Chinese chess!Our site is tobygirledu.comMy QQ num is 87654321.6. Append text I l
Content source "Learning Linux operations with older boys: Core Foundation Combat", is expected to be published in July 2018, please expect, the old boy qq:31333741.Linux rookie and Novice of the Gospel, the equivalent of bird's private cuisine (too old) 2018 of the latest enterprise-level combat upgrade, the enterprise practical combat angle, a comprehensive explanation of Linux operations Core basic knowledge.Linux Three Musketeers Regular expressio
"
\{n,\}
matches the previous line with the last character repeat number at least n times
\{n\}
matches the line with the previous character repeated n times
example 1:[[email protected] tmp]# grep"^th"Regular_express.txt ThisDress doesn't fit me.example 2:[[email protected] tmp]# grep"y$"Regular_express.txt"Open Source" isa good mechanism to devolop programsyapple isMy favorite Foody example 3:[[email protected] tmp]# grep"425.0"Regul
;person.txt > 106,wuxingge,ufo> 107,lee,xo>eof9. do not show blank line method ! represents an inverse# sed '/^$/d ' person.txt# sed-n '/^$/!p ' person.txt# awk '!/^$/' person.txt# grep-v ' ^$ ' person.txt 's###' means replacing the first object that meets the criteria by line# sed ' s#1#dou# ' person.txtDou01,oldboy,ceo-I means OK to modify-i.bak means to back up and modify firstDouble quotes inside the SED variable can be executedA. sed command symbol indicates what was previously matched t
Tags: sed(1) SED effectSED is a non-interactive text editor, and the Contrast VI (VIM) is an interactive editor(2) SED syntaxsed [-option] [command] FilesComments:SED tool default processing text, text content output screen has been modified, but the contents of the file is not modified, need to add I parameter to completely modify(3) SED combatSED Combat Replacement textSed ' s/old/new/g ' jfedu.txtSed ' s#http://www.jd.com#http://www.baidu.com#g ' jfedu.txtSED Actual Combat Print textSed-n ' 1
Again, the awk basic syntax format:awk [Options] ' Pattern {Action} ' file1 file2The previous article discussed two types of pattern (BEGIN, END), and this article explores other pattern (pattern) usages again.What is the pattern? A pattern is a matching condition that satisfies a condition and executes the subsequent action.1, without any pattern of usage, called null mode[Email protected]:~/linux/awkawk'{print}' man Lisi2, by the built-in variable NF, the row of the print column equals 3[Ema
and append to default output h: Overwrite content in pattern space to hold space H: Append content in pattern space to hold space G: Remove data from hold space to pattern space G: Append from Hold space to pattern space X: Swap the contents of the pattern space with the content in the Hold space N: reads the next line of matching rows to the pattern space N: reads the next line of the matched rows to the pattern space D: Delete the row in the pattern space D: If the pattern space contains a ne
*/ Multiplication Redundancy^ * exponentiation+ +--increase or decrease, as prefix or suffix[[Email protected] ~] #awk ' begin{a= "B";p rint a,a++,a--, ++a;} 'B 0 1 1[[Email protected] ~] #awk ' begin{a= "0";p rint a,a++,a--, ++a;} '0 0 1 1[[Email protected] ~] #awk ' begin{a= "0";p rint a,a++,--a,++a;} '0 0 0 1#和其它编程语言一样, all operations are performed as arithmetic operators, the operands are automatically converted to numeric values, and all non-numeric values are changed to 0Assignment operato
fileCommon options:-E: Multiple matching modes can be used simultaneously, for example: Grep-e ' match mode 1 '-e ' matching mode 2 '。。。 File-F writes a matching pattern file (Scripfile): Indicates that the matching pattern is extracted from the Scripfile to match the file-Q: Silent mode, does not print the class volume regardless of the success of the match--color=auto: Highlight the pattern that is matched to-V: Output only content that is not matched to the pattern-O: Output only matches to
1,2,3,4,5,6,7,8,9,121:40752,4,6,8,7,121:20113,3,5,7,9,8,5,8,121:10121Extract 121:portThe explanations are as follows:Awk-f "," ' {print $NF} ' Filename-f delimiter is, NF prints the last fieldGrep-o ' [0-9]\+:[0-9]\+$ ' filename-o exact match \+ word connection650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/84/8D/wKioL1eUcXXir2gaAAAl6gBtrCk237.png "title=" 2.png " alt= "Wkiol1eucxxir2gaaaal6gbtrck237.png"/>Obvious grep-o results to be accurate{"Aid": "$", "path": "Attachment/mon_1112/
Advanced Editing Commands:h: Overwrite the contents of the pattern space in the hold space h: Append the contents of the pattern space to the hold space hHCopy/appendpatternspacetoholdspace g: Overlay content in the hold space into the pattern space g: Append content in the hold space to the pattern space ggcopy/appendholdspaceto patternspace.x: Swap the content in the pattern space with the content in the hold space xExchangethecontentsoftheholdand Patternspaces.n: Overwrite the next line of
assigned an accept queue on the physical network card, the VMQ is mapped to the VM's address space, and when the physical NIC receives the data, the Mac locates the data in the VM's VMQ, the VM accesses the data directly and does not need to copy the data vswitch.650) this.width=650; "style=" Width:auto;height:auto; "src=" http://mmbiz.qpic.cn/mmbiz/ orl2fuhmgzdwakb8e9rq8hb1hdqzhxrgtiakiuefdlfe9al4vda2crkxrbk6lfdgohbwbtjznxnzhszqkbpvtcq/640?wx_fmt=png Wxfrom=5wx_lazy=1 "alt=" 640?wx_fmt=pngwxfr
One, Grep:global searchregular expression and Print out of the line.Text Filter tool (Pattern: pattern) Tool(1) function:1) Text Search Tool2) match the target text line by row according to user-specified "mode (filter)";3) print matches to the Whole Line text ;(2) Pattern: The filter condition written by metacharacters and text characters of regular expressions;mode through Regular expression engine Match Search(3) formatgrep [OPTIONS] PATTERN [FILE ...]grep [OPTIONS] [-E PATTERN |-f file]
remember such a picture is OK.Because my ability is limited, so the error in the text is inevitable, I hope you correct and put forward valuable suggestions.Reference: "The ASP. NET MVC 5 Framework"The thing about the code.Source: http://songwenjie.cnblogs.com/Statement: This article for Bo Master Learning sentiment Summary, the level is limited, if improper, welcome correction. If you think it's good, just click on the "recommend" button below, thanks for your support. Reprint and quote please
“nagiosadm”就是上面定义的联系人,如果有多个联系人则以逗号相隔 }7. commands.cfg file #此文件默认是存在的, can be used without modification, of course, if there are new commands to join, this file can be added 12. Modify the Nagios configuration file: 1. Resource.cfg file #是nagios的变量定义文件2. Modify Cgi.cfg:cd /usr/local/nagios/etc/ vim cgi.cfg #文件用来控制相关cgi脚本#由于nagios的web监控界面验证用户为nagiosadm,所以只需在cgi.cfg文件中添加此用户的执行权限#末尾添加default_user_name=nagiosadmauthorized_for_system_information=nagiosadmin,nagiosadm authorized_for_configura
property information, note the writing format, do not have extra spacesvim /usr/local/nagios/etc/objects/hosts.cfgdefine host{ use linux-server //引用主机linux-server的属性信息,linux-server主机在templates.cfg文件中进行了定义。 host_name Nagios-Linux //主机名,自定义 alias Nagios-Linux //主机别名 address 172.16.10.20 //被监控的主机地址,这个地址可以是ip,也可以是域名。 } define host{ use linux-se
substring of a string, rlength the number of characters to the end of the substring. SUBSTR can be beneficial for these variables to intercept the stringToUpper and ToLower can be used for conversions between string sizes, which are only valid in Gawk8, Mathematical functionsFunction name return valueatan2 (x, y) y,x in the range of cotangentcos (x) cosine functionEXP (x) exponentiationint (x) roundingLog (x) natural logarithmRAND () random numberSin (x) sinesqrt (x) square rootSrand (x) x is t
than 20;awk-f ': ' nr>20 ' Test.txt7. Use ': ' As a delimiter to print all third paragraphs less than the fourth paragraph;awk-f ': ' $38. Use ': ' As a separator, print the first paragraph and the last paragraph, and the middle with ' @ ' connection (for example, the first line should be the form of "[Email Protected]/bin/bash";awk-f ': ' {print $ ' @ ' $NF} ' test.txt9. Use ': ' As a delimiter to add and sum the fourth paragraph of the entire document;awk-f ': ' {(sum+=$4)}; END {print sum} '
=" Wkiol1ep0whqlrvnaaazfkxlane808.png "src=" http://s5.51cto.com/wyfs02/M01/85/9B/ Wkiol1ep0whqlrvnaaazfkxlane808.png "/>Sed ' g ' file deletes all rows650) this.width=650; "title=" sed #039; g #039; File.png "src=" Http://s3.51cto.com/wyfs02/M02/85/9B/wKiom1ep0oXBGFUrAAAOqJr39nM537.png "alt=" Wkiom1ep0oxbgfuraaaoqjr39nm537.png "/>Sed '/^$/d; G ' file adds a blank line after each line650) this.width=650; "title=" sed #039; ^ $d; g #039; File.png "alt=" Wkiom1ep0bvzot6qaaaawholxf0835.png "src="
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.