加入收藏 | 设为首页 | 会员中心 | 我要投稿 温州站长网 (https://www.0577zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

awk - Unix, Linux Command---reference

发布时间:2021-01-30 02:45:05 所属栏目:Linux 来源:网络整理
导读:副标题#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

</tr>
<tr valign="top">
<td>PROCINFO["euid"]</td>
<td valign="bottom">the value of the?geteuid(2) system call.</td>

(编辑:温州站长网)

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

</tr>
<tr valign="top">
<td>ENVIRON</td>
<td valign="bottom">An array containing the values of the current environment. The array is indexed by the environment variables,each element being the value of that variable (e.g.,?ENVIRON["HOME"]?might be?/home/arnold). Changing this array does not affect the environment seen by programs which?gawk?spawns via redirection or the?system()?function.</td>

</tr>
<tr valign="top">
<td>ERRNO</td>
<td valign="bottom">If a system error occurs either doing a redirection for?getline,during a read for?getline,or during a?close(),then?ERRNO?will contain a string describing the error. The value is subject to translation in non-English locales.</td>

</tr>
<tr valign="top">
<td>FIELDWIDTHS</td>
<td valign="bottom">A white-space separated list of fieldwidths. When set,?gawkparses the input into fields of fixed width,instead of using the value of the?FS?variable as the field separator.</td>

</tr>
<tr valign="top">
<td>FILENAME</td>
<td valign="bottom">The name of the current input file. If no files are specified on the command line,the value of?FILENAME?is ‘‘-’’. However,FILENAME?is undefined inside the?BEGIN?block (unless set bygetline).</td>

</tr>
<tr valign="top">
<td>FNR</td>
<td valign="bottom">The input record number in the current input file.</td>

</tr>
<tr valign="top">
<td>FS</td>
<td valign="bottom">The input field separator,a space by default. See?<a href="http://www.tutorialspoint.com/#8"&gt;Fields,above.</td>

</tr>
<tr valign="top">
<td>IGNORECASE</td>
<td valign="bottom">Controls the case-sensitivity of all regular expression and string operations. If?IGNORECASE?has a non-zero value,then string comparisons and pattern matching in rules,field splitting withFS,record separating with?RS,regular expression matching with?~?and?!~,and the?gensub(),?gsub(),?index(),?match(),split(),and?sub()?built-in functions all ignore case when doing regular expression operations.?NOTE:?Array subscripting is?notaffected. However,the?asort()?and?asorti()?functions are affected.

Thus,if?IGNORECASE?is not equal to zero,?/aB/?matches all of the strings?"ab",?"aB",?"Ab",and?"AB". As with all?AWKvariables,the initial value of?IGNORECASE?is zero,so all regular expression and string operations are normally case-sensitive. Under Unix,the full ISO 8859-1 Latin-1 character set is used when ignoring case. As of?gawk?3.1.4,the case equivalencies are fully locale-aware,based on the C??facilities such as?isalpha(),and?tolupper().

</td>

</tr>
<tr valign="top">
<td>LINT</td>
<td valign="bottom">Provides dynamic control of the?--lint?option from within an?AWKprogram. When true,?gawk?prints lint warnings. When false,it does not. When assigned the string value?"fatal",lint warnings become fatal errors,exactly like?--lint=fatal. Any other true value just prints warnings.</td>

</tr>
<tr valign="top">
<td>NF</td>
<td valign="bottom">The number of fields in the current input record.</td>

</tr>
<tr valign="top">
<td>NR</td>
<td valign="bottom">The total number of input records seen so far.</td>

</tr>
<tr valign="top">
<td>OFMT</td>
<td valign="bottom">The output format for numbers,by default.</td>

</tr>
<tr valign="top">
<td>OFS</td>
<td valign="bottom">The output field separator,a space by default.</td>

</tr>
<tr valign="top">
<td>ORS</td>
<td valign="bottom">The output record separator,by default a newline.</td>

</tr>
<tr valign="top">
<td>PROCINFO</td>
<td valign="bottom">The elements of this array provide access to information about the running?AWK?program. On some systems,there may be elements in the array,?"group1"?through?"groupn"?for some?n,which is the number of supplementary groups that the process has. Use the?in?operator to test for these elements. The following elements are guaranteed to be available:
<table class="src" border="1" cellspacing="0" cellpadding="5">

Description
热点阅读