加入收藏 | 设为首页 | 会员中心 | 我要投稿 网站开发网_马鞍山站长网 (https://www.0555zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长百科 > 正文

awk - Unix, Linux Command---reference

发布时间:2021-01-29 04:45:02 所属栏目:站长百科 来源:网络整理
导读:副标题#e# http://www.tutorialspoint.com/unix_commands/awk.htm gawk - pattern scanning and processing language gawk?[?POSIX?or?GNU?style options ]?-f? program-file ?[?--?] file ...?gawk?[?POSIX?or?GNU?style options ] [?--?]? program-text ?

<tr>
<th width="25%">Tag

hex digitsdddcc.The escape sequences may also be used inside constant regular expressions (e.g.,?/[ tfnrv]/?matches whitespace characters).

In compatibility mode,the characters represented by octal and hexadecimal escape sequences are treated literally when used in regular expression constants. Thus,/a52b/?is equivalent to?/a*b/.

AWK?is a line-oriented language. The pattern comes first,and then the action. Action statements are enclosed in?{?and?}. Either the pattern may be missing,or the action may be missing,but,not both. If the pattern is missing,the action is executed for every single record of input. A missing action is equivalent to

{ print }

which prints the entire record.

Comments begin with the ‘‘#’’ character,and continue until the end of the line. Blank lines may be used to separate statements. Normally,a statement ends with a newline,this is not the case for lines ending in a ‘‘,’’,?{,??,?:,?&&,or?||. Lines ending indo?or?else?also have their statements automatically continued on the following line. In other cases,a line can be continued by ending it with a ‘‘’’,in which case the newline will be ignored.

(编辑:网站开发网_马鞍山站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

Starting with version 3.1 of?gawk,?you may use C-style octal and hexadecimal constants in your AWK program source code. For example,the octal value?011?is equal to decimal9,and the hexadecimal value?0x11?is equal to decimal 17.

String Constants

String constants in?AWK?are sequences of characters enclosed between double quotes ("). Within strings,certain?escape sequences?are recognized,as in C. These are:

<table class="src" border="1" cellspacing="0" cellpadding="5">

Description