加入收藏 | 设为首页 | 会员中心 | 我要投稿 温州站长网 (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>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>

(编辑:温州站长网)

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

</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
热点阅读