| Description |
fs--field-separatorfs
fsfor the input field separator (the value of theFSpredefined variable).</tr>
<tr valign="top">
<td colspan="2">
-vvar=val--assignvar=val
</td>
</tr>
<tr valign="top">
<td width="6%"></td>
<td>Assign the valuevalto the variablevar,before execution of the program begins. Such variable values are available to theBEGINblock of anAWKprogram.</td>
</tr>
<tr valign="top">
<td colspan="2">
-fprogram-file--fileprogram-file
</td>
</tr>
<tr valign="top">
<td width="6%"></td>
<td>Read theAWKprogram source from the fileprogram-file,instead of from the first command line argument. Multiple-f(or--file) options may be used.</td>
</tr>
<tr valign="top">
<td>
-mfNNN-mrNNN
</td>
<td valign="bottom">Set various memory limits to the valueNNN. Thefflag sets the maximum number of fields,and therflag sets the maximum record size. These two flags and the-moption are from the Bell Laboratories research version ofUNIXawk. They are ignored bygawk,sincegawkhas no pre-defined limits.</td>
</tr>
<tr valign="top">
<td colspan="2">
-W compat-W traditional--compat--traditional
</td>
</tr>
<tr valign="top">
<td width="6%"></td>
<td>Run incompatibilitymode. In compatibility mode,gawkbehaves identically toUNIXawk; none of theGNU-specific extensions are recognized. The use of--traditionalis preferred over the other forms of this option. See<a href="http://www.tutorialspoint.com/#34">GNU EXTENSIONS,below,for more information.</td>
</tr>
<tr valign="top">
<td colspan="2">
-W copyleft-W copyright--copyleft--copyright
</td>
</tr>
<tr valign="top">
<td width="6%"></td>
<td>Print the short version of theGNUcopyright information message on the standard output and exit successfully.</td>
</tr>
<tr valign="top">
<td colspan="2">
-W dump-variables[=file]--dump-variables[=file]</td>
</tr>
<tr valign="top">
<td width="6%"></td>
<td>Print a sorted list of global variables,their types and final values tofile. If nofileis provided,gawkuses a file namedawkvars.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 likei,j,and so on.)
</td>
</tr>
<tr valign="top">
<td colspan="2">
-W execfile--execfile
</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 theAWKprogram,and generate aGNU.poformat file on standard output with entries for all localizable strings in the program. The program itself is not executed. See theGNUgettextdistribution for more information on.pofiles.</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 theGNU 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 otherAWKimplementations. With an optional argument offatal,lint warnings become fatal errors. This may be drastic,but its use will certainly encourage the development of cleanerAWKprograms. With an optional argument ofinvalid,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 Unixawk.</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>
(编辑:安卓应用网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!