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

awk - Unix, Linux Command---reference

发布时间:2021-01-26 15:34:41 所属栏目:Linux 来源:网络整理
导读: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-

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

</tr>
<tr valign="top">
<td>o</td>
<td valign="bottom">Only space and tab act as field separators when?FS?is set to a single space,newline does not.</td>

</tr>
<tr valign="top">
<td>o</td>
<td valign="bottom">You cannot continue lines after???and?:.</td>

</tr>
<tr valign="top">
<td>o</td>
<td valign="bottom">The synonym?func?for the keyword?function?is not recognized.</td>

</tr>
<tr valign="top">
<td>o</td>
<td valign="bottom">The operators??and?=?cannot be used in place of?^?and?^=.</td>

</tr>
<tr valign="top">
<td>o</td>
<td valign="bottom">The?fflush()?function is not available.</td>

</tr>

</tr>
<tr valign="top">
<td colspan="2">
-W profile[=prof_file]?--profile[=prof_file]</td>

(编辑:ASP站长)

【免责声明】本站内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

</tr>
<tr valign="top">
<td width="6%">?</td>
<td>Print a sorted list of global variables,their types and final values to?file. If no?file?is provided,?gawk?uses a file named?awkvars.outin the current directory.

Having a list of all the global variables is a good way to look for typographical errors in your programs. You would also use this option if you have a large program with a lot of functions,and you want to be sure that your functions don’t inadvertently use global variables that you meant to be local. (This is a particularly easy mistake to make with simple variable names like?i,?j,and so on.)

</td>

</tr>
<tr valign="top">
<td colspan="2">
-W exec?file?--exec?file
</td>

</tr>
<tr valign="top">
<td width="6%">?</td>
<td>Similar to?-f,however,this is option is the last one processed. This should be used with?#!?scripts,particularly for CGI applications,to avoid passing in options or source code (!) on the command line from a URL. This option disables command-line variable assignments.</td>

</tr>
<tr valign="top">
<td>
-W gen-po?--gen-po
</td>
<td valign="bottom">Scan and parse the?AWK?program,and generate a?GNU?.poformat file on standard output with entries for all localizable strings in the program. The program itself is not executed. See the?GNU?gettext?distribution for more information on?.po?files.</td>

</tr>
<tr valign="top">
<td>
-W help?-W usage?--help?--usage
</td>
<td valign="bottom">Print a relatively short summary of the available options on the standard output. (Per the?GNU Coding Standards,these options cause an immediate,successful exit.)</td>

</tr>
<tr valign="top">
<td colspan="2">
-W lint[=value]?--lint[=value]</td>

</tr>
<tr valign="top">
<td width="6%">?</td>
<td>Provide warnings about constructs that are dubious or non-portable to other?AWK?implementations. With an optional argument of?fatal,lint warnings become fatal errors. This may be drastic,but its use will certainly encourage the development of cleaner?AWK?programs. With an optional argument of?invalid,only warnings about things that are actually invalid are issued. (This is not fully implemented yet.)</td>

</tr>
<tr valign="top">
<td colspan="2">
-W lint-old?--lint-old
</td>

</tr>
<tr valign="top">
<td width="6%">?</td>
<td>Provide warnings about constructs that are not portable to the original version of Unix?awk.</td>

</tr>
<tr valign="top">
<td colspan="2">
-W non-decimal-data?--non-decimal-data
</td>

</tr>
<tr valign="top">
<td width="6%">?</td>
<td>Recognize octal and hexadecimal values in input data.?Use this option with great caution!
</td>

</tr>
<tr valign="top">
<td colspan="2">
-W posix?--posix
</td>

</tr>
<tr valign="top">
<td width="6%">?</td>
<td>This turns on?compatibility?mode,with the following additional restrictions:
<table class="src" border="1" cellspacing="0" cellpadding="5">

Description
相关内容
未处理完善
    无相关信息
未处理完善