临界值是什么意思|
公关是干什么的|
地屈孕酮片什么时候吃|
卒中什么意思|
水果都有什么|
皇帝菜是什么菜|
美尼尔眩晕症吃什么药|
代销商是什么意思|
湿气重的人不能吃什么|
炒菜是什么意思|
924是什么星座|
田七是什么|
厍是什么意思|
测试你是什么样的人|
多梦是什么原因|
神经系统由什么组成|
中子是什么|
二氧化碳高是什么原因|
潦倒是什么意思|
皮肤瘙痒症用什么药|
血沉高说明什么问题|
跳蚤为什么只咬一个人|
人为什么需要诗歌|
去港澳旅游需要什么证件|
2017年属鸡火命缺什么|
99年属什么生肖|
超细旦是什么面料|
红楼梦是一部什么小说|
生辰纲是什么东西|
瑶浴spa是什么意思|
肠胃蠕动慢吃什么药|
gg是什么牌子的包包|
旭日是什么意思|
心房颤动是什么意思|
74年属什么的生肖|
10月25号是什么星座|
什么情况下需要做肠镜检查|
甘少一横读什么|
冰爽丝是什么面料|
什么是边界感|
过指什么生肖|
猫吃什么下奶最快最多|
景气是什么意思|
黄精是什么药材|
容易静电的人说明什么|
swi是什么检查|
腕管综合征挂什么科|
怀孕有什么特征和反应|
打完狂犬疫苗不能吃什么|
走南闯北是什么生肖|
小鸟进屋有什么预兆吗|
秤砣是什么意思|
手球是什么运动|
什么叫做原发性高血压|
女性为什么会感染巨细胞病毒|
乳头发黑是什么原因|
奥司他韦是什么药|
脱发是什么原因引起的|
肠化十是什么意思|
胰腺在人体起什么作用|
去减一笔变成什么字|
拉肚子吃什么饭|
为什么口腔溃疡|
三番四次是什么生肖|
亟待解决什么意思|
智齿肿痛吃什么药|
天葬是什么|
甲亢吃什么好的更快|
玮五行属什么|
白露是什么季节|
三伏天是什么|
维生素c什么牌子好|
什么时候看到的月亮最大|
47岁属什么|
80年五行属什么|
初字五行属什么|
拉不出尿是什么原因|
着凉嗓子疼吃什么药|
lcc是什么意思|
老匹夫是什么意思|
眼睛疼滴什么眼药水|
幽默是什么意思|
1921年是什么年|
什么叫桑拿|
丛林法则是什么意思|
咒语是什么意思|
昆明有什么特产|
伤口感染用什么药|
专科什么专业就业前景好|
河南为什么叫河南|
什么是扁平疣|
首鼠两端什么意思|
做梦数钱是什么意思啊|
肛门疼痛是什么原因|
火花是什么意思|
泡芙是什么|
情有独钟是什么意思|
鲜卑人是现在的什么人|
老犯困是什么原因|
草字头加青读什么|
尿痛吃什么药效果最好|
女性体毛多是什么原因|
甲状腺结节看什么科室最好|
太阳星座是什么意思|
双侧卵巢多囊性改变是什么意思|
肾动脉狭窄有什么症状|
田此读什么|
因地制宜是什么意思|
身体机能是什么意思|
益生菌适合什么人群吃|
气管炎吃什么药|
人流后什么叫重体力活|
除是什么意思|
蝉联是什么意思|
死间计划到底是什么|
什么是腺样体|
养殖业什么最赚钱|
什么能增强免疫力|
发菜是什么菜|
身强力壮是什么生肖|
什么笑什么笑|
什么是开悟|
改善什么|
头发细软是什么原因|
冰箱发热是什么原因|
一一是什么意思|
颈椎不好挂什么科|
老虎属于什么科|
老当益壮是什么意思|
肠道痉挛吃什么药|
陈皮泡水喝有什么作用|
引火归元是什么意思|
什么是大健康产业|
鱼平念什么|
spank是什么意思|
gbm是什么意思|
吃什么可降低胆固醇|
碳酸钠是什么|
亟须什么意思|
肚脐眼左边是什么部位|
行尸走肉是什么意思|
疑难杂症是什么意思|
鸡涌是什么意思|
老炮是什么意思|
什么水果最贵|
帝舵手表什么档次|
睡觉手麻是什么原因引起的女人|
低血压要注意些什么|
吃什么雌激素会增多|
pussy是什么意思|
白糖和冰糖有什么区别|
虾腹部的黑线是什么|
姐姐的女儿叫什么称呼|
彧读什么|
蜥蜴什么动物|
喉炎吃什么药|
鼻炎吃什么消炎药效果最好|
宫颈粘连什么症状|
泵头是什么|
儿童结膜炎用什么眼药水|
猪肝炒什么好吃|
为什么印度人叫阿三|
sys是什么意思|
甲基是什么|
八月2号是什么星座|
7月份有什么节日|
脱毛膏的原理是什么|
葡萄糖是什么意思|
银杏叶提取物治什么病|
不下面一个一念什么|
人什么地灵|
艾滋病一年有什么症状|
胆固醇低是什么原因|
输卵管堵塞是什么原因|
湿气重用什么泡脚最好|
口苦吃什么药好|
蛋白质是什么食物|
狗狗为什么喜欢舔人|
龙骨是什么骨头|
uniqlo是什么牌子|
舌头痛挂什么科|
鱼子酱是什么|
病入膏肓什么意思|
什么西瓜|
怕冷是什么原因|
采耳是什么意思|
爱被蚊子咬是什么原因|
直男是什么|
经常干咳嗽是什么原因|
1974年属虎的是什么命|
腰子是什么|
肾积水挂什么科室|
烂舌头是什么原因|
尿蛋白是什么原因|
可爱是什么意思|
备孕男性检查什么项目|
红脸关公代表什么意思|
三氧化硫常温下是什么状态|
射手属于什么象星座|
霸王龙的后代是什么|
五步蛇为什么叫五步蛇|
驾驶证b2能开什么车|
什么东西可以减肥|
脸上白一块一块的是什么原因|
什么是一本|
vsop是什么意思|
这是什么情况|
高压正常低压低是什么原因|
日头是什么意思|
泡妞是什么意思啊|
葡萄糖氯化钠注射作用是什么|
先兆流产是什么原因|
看脖子挂什么科|
心肌缺血是什么症状|
免疫球蛋白低说明什么|
什么头什么臂|
月经时间过长是什么原因引起的|
晚上六点是什么时辰|
肺和大肠相表里是什么意思|
头眩晕吃什么药|
嗜睡乏力没精神容易疲劳是什么原因|
口红什么牌子最好|
半夜饿是什么原因|
胃部间质瘤是什么性质的瘤|
吃什么 长高|
吃什么升血压快|
m1是什么单位|
superman什么意思|
圣罗兰为什么叫杨树林|
佛手柑是什么|
骟是什么意思|
陪跑什么意思|
门对门有什么说法|
舌头痛吃什么药好得快|
蝈蝈吃什么食物|
夺嫡是什么意思|
什么是纳豆|
结婚送什么|
梦见种地是什么意思|
孕妇钙片什么时间段吃最好|
单身领养孩子需要什么条件|
心热是什么原因造成的|
肚子饱胀是什么原因|
淞字五行属什么|
guou是什么牌子的手表|
什么是优质蛋白食物|
流量mb是什么意思|
口气重是什么原因|
膈应人是什么意思|
血清果糖胺测定是什么|
老花眼是什么原因引起的|
乌龟喜欢吃什么食物|
欢什么喜什么|
梦见大门牙掉了是什么意思|
肾虚吃什么东西补得快|
四维什么时候做|
金牛座和什么星座不合|
无痛人流后吃什么对身体恢复比较好|
左眼皮跳是什么预兆|
什么入什么出|
25羟基维生素d是什么|
晚上老是做梦是什么原因|
吃了阿莫西林不能吃什么|
老年脑是什么病|
百度
全国机动车保有量首破3亿辆 12省份超过1000万
百度 该疗法可有效克服肿瘤局部免疫抑制微环境,应用前景广阔。
AWK(1) NetBSD General Commands Manual AWK(1)
NAME
awk - pattern-directed scanning and processing language
SYNOPSIS
awk [-F fs] [-v var=value] [-safe] [-d[N]] [prog | -f filename] file ...
awk -V
DESCRIPTION
awk is the Bell Labs' implementation of the AWK programming language as
described in the The AWK Programming Language by A. V. Aho, B. W.
Kernighan, and P. J. Weinberger.
awk scans each input file for lines that match any of a set of patterns
specified literally in prog or in one or more files specified as -f
filename. With each pattern there can be an associated action that will
be performed when a line of a matches the pattern. Each line is matched
against the pattern portion of every pattern-action statement; the asso-
ciated action is performed for each matched pattern. The file name -
means the standard input. Any file of the form var=value is treated as
an assignment, not a filename, and is executed at the time it would have
been opened if it were a filename.
The options are as follows:
-d[N] Set debug level to specified number N. If the number is omitted,
debug level is set to 1.
-f filename
Read the AWK program source from specified file filename, instead
of the first command line argument. Multiple -f options may be
specified.
-F fs Set the input field separator FS to the regular expression fs.
-mr NNN, -mf NNN
Obsolete, no longer needed options. Set limit on maximum record
or fields number.
-safe Potentially unsafe functions such as system() make the program
abort (with a warning message).
-v var=value
Assign the value value to the variable var before prog is exe-
cuted. Any number of -v options may be present.
-V Print awk version on standard output and exit.
An input line is normally made up of fields separated by white space, or
by regular expression FS. The fields are denoted $1, $2, ..., while $0
refers to the entire line. If FS is null, the input line is split into
one field per character.
A pattern-action statement has the form
pattern { action }
A missing { action } means print the line; a missing pattern always
matches. Pattern-action statements are separated by newlines or semi-
colons.
An action is a sequence of statements. Statements are terminated by
semicolons, newlines or right braces. An empty expression-list stands
for $0. String constants are quoted " ", with the usual C escapes recog-
nized within. Expressions take on string or numeric values as appropri-
ate, and are built using the Operators (see next subsection). Variables
may be scalars, array elements (denoted x[i]) or fields. Variables are
initialized to the null string. Array subscripts may be any string, not
necessarily numeric; this allows for a form of associative memory. Mul-
tiple subscripts such as [i,j,k] are permitted; the constituents are con-
catenated, separated by the value of SUBSEP.
Operators
awk operators, in order of decreasing precedence, are:
(...) Grouping
$ Field reference
++ -- Increment and decrement, can be used either as postfix or prefix.
^ Exponentiation (the ** form is also supported, and **= for the
assignment operator).
+ -! Unary plus, unary minus and logical negation.
* / % Multiplication, division and modulus.
+ - Addition and subtraction.
space String concatenation.
< >
<= >=
!= == Regular relational operators
~ !~ Regular expression match and not match
in Array membership
&& Logical AND
|| Logical OR
?: C conditional expression. This is used as expr1 ? expr2 : expr3 .
If expr1 is true, the result value is expr2, otherwise it is
expr3. Only one of expr2 and expr3 is evaluated.
= += -=
*= /= %= ^=
Assignment and Operator-Assignment
Control Statements
The control statements are as follows:
if ( expression ) statement [else statement]
while( expression ) statement
for( expression ; expression ; expression ) statement
for( var in array ) statement
do statement while( expression )
break
continue
delete array [expression]
delete array
exit [expression] expression
return [expression]
{ [statement ...] }
I/O Statements
The input/output statements are as follows:
close(expr)
Closes the file or pipe expr.
fflush(expr)
Flushes any buffered output for the file or pipe expr.
getline [var]
Set var (or $0 if var is not specified) to the next input record
from the current input file. getline returns 1 for a successful
input, 0 for end of file, and -1 for an error.
getline [var] < file
Set var (or $0 if var is not specified) to the next input record
from the specified file file.
expr | getline
Pipes the output of expr into getline; each call of getline
returns the next line of output from expr.
next Skip remaining patterns on this input line.
nextfile
Skip rest of this file, open next, start at top.
print [expr-list] [> file]
The print statement prints its arguments on the standard output
(or to a file if > file or to a pipe if | expr is present), sepa-
rated by the current output field separator OFS, and terminated
by the output record separator ORS. Both file and expr may be
literal names or parenthesized expressions; identical string val-
ues in different statements denote the same open file.
printf format [, expr-list] [> file]
Format and print its expression list according to format. See
printf(3) for list of supported formats and their meaning.
Mathematical and Numeric Functions
AWK has the following mathematical and numerical functions built-in:
atan2(x, y)
Returns the arctangent of x / y in radians. See also atan2(3).
cos(expr)
Computes the cosine of expr, measured in radians. See also
cos(3).
exp(expr)
Computes the exponential value of the given argument expr. See
also exp(3).
int(expr)
Truncates expr to integer.
log(expr)
Computes the value of the natural logarithm of argument expr.
See also log(3).
rand() Returns random number between 0 and 1.
sin(expr)
Computes the sine of expr, measured in radians. See also sin(3).
sqrt(expr)
Computes the non-negative square root of expr. See also sqrt(3).
srand([expr])
Sets seed for random number generator ( rand()) and returns the
previous seed.
String Functions
AWK has the following string functions built-in:
gensub(r, s, h, [t])
Search the target string t for matches of the regular expression
r. If h is a string beginning with g or G, then replace all
matches of r with s. Otherwise, h is a number indicating which
match of r to replace. If no t is supplied, $0 is used instead.
Unlike sub() and gsub(), the modified string is returned as the
result of the function, and the original target is not changed.
Note that the \n sequences within replacement string s supported
by GNU awk are not supported at this moment.
gsub(r, t, [s])
same as sub() except that all occurrences of the regular expres-
sion are replaced; sub() and gsub() return the number of replace-
ments.
index(s, t)
the position in s where the string t occurs, or 0 if it does not.
length([string])
the length of its argument taken as a string, or of $0 if no
argument.
match(s, r)
the position in s where the regular expression r occurs, or 0 if
it does not. The variables RSTART and RLENGTH are set to the
position and length of the matched string.
split(s, a, [fs])
splits the string s into array elements a[1], a[2], ..., a[n],
and returns n. The separation is done with the regular expres-
sion fs or with the field separator FS if fs is not given. An
empty string as field separator splits the string into one array
element per character.
sprintf(fmt, expr, ...)
Returns the string resulting from formatting expr according to
the printf(3) format fmt.
sub(r, t, [s])
substitutes t for the first occurrence of the regular expression
r in the string s. If s is not given, $0 is used.
substr(s, m, [n])
Returns the at most n-character substring of s starting at posi-
tion m, counted from 1. If n is omitted, the rest of s is
returned.
tolower(str)
returns a copy of str with all upper-case characters translated
to their corresponding lower-case equivalents.
toupper(str)
returns a copy of str with all lower-case characters translated
to their corresponding upper-case equivalents.
Time Functions
This awk provides the following two functions for obtaining time stamps
and formatting them:
systime()
Returns the value of time in seconds since the start of Unix
Epoch (Midnight, January 1, 1970, Coordinated Universal Time).
See also time(3).
strftime([format [, timestamp]])
Formats the time timestamp according to the string format.
timestamp should be in same form as value returned by systime().
If timestamp is missing, current time is used. If format is miss-
ing, a default format equivalent to the output of date(1) would
be used. See the specification of ANSI C strftime(3) for the for-
mat conversions which are supported.
Other built-in functions
system(cmd)
executes cmd and returns its exit status
Patterns
Patterns are arbitrary Boolean combinations (with ! || &&) of regular
expressions and relational expressions. Regular expressions are as in
egrep(1). Isolated regular expressions in a pattern apply to the entire
line. Regular expressions may also occur in relational expressions,
using the operators ~ and !~. / re / is a constant regular expression;
any string (constant or variable) may be used as a regular expression,
except in the position of an isolated regular expression in a pattern.
A pattern may consist of two patterns separated by a comma; in this case,
the action is performed for all lines from an occurrence of the first
pattern though an occurrence of the second.
A relational expression is one of the following:
expression matchop regular-expression
expression relop expression
expression in array-name
(expr, expr,... ) in array-name
where a relop is any of the six relational operators in C, and a matchop
is either ~ (matches) or !~ (does not match). A conditional is an arith-
metic expression, a relational expression, or a Boolean combination of
these.
The special patterns BEGIN and END may be used to capture control before
the first input line is read and after the last. BEGIN and END do not
combine with other patterns.
Built-in Variables
Variable names with special meanings:
ARGC argument count, assignable
ARGV argument array, assignable; non-null members are taken as
filenames
CONVFMT conversion format used when converting numbers (default
"%.6g")
ENVIRON array of environment variables; subscripts are names.
FILENAME the name of the current input file
FNR ordinal number of the current record in the current file
FS regular expression used to separate fields; also settable by
option -F fs.
NF number of fields in the current record
NR ordinal number of the current record
OFMT output format for numbers (default "%.6g" )
OFS output field separator (default blank)
ORS output record separator (default newline)
RS input record separator (default newline)
RSTART Position of the first character matched by match(); 0 if not
match.
RLENGTH Length of the string matched by match(); -1 if no match.
SUBSEP separates multiple subscripts (default 034)
Functions
Functions may be defined (at the position of a pattern-action statement)
thus:
function foo(a, b, c) { ...; return x }
Parameters are passed by value if scalar and by reference if array name;
functions may be called recursively. Parameters are local to the func-
tion; all other variables are global. Thus local variables may be cre-
ated by providing excess parameters in the function definition.
EXAMPLES
length($0) > 72
Print lines longer than 72 characters.
{ print $2, $1 }
Print first two fields in opposite order.
BEGIN { FS = ",[ \t]*|[ \t]+" }
{ print $2, $1 }
Same, with input fields separated by comma and/or blanks and
tabs.
{ s += $1 }
END { print "sum is", s, " average is ", s/NR }
Add up first column, print sum and average.
/start/, /stop/
Print all lines between start/stop pairs.
BEGIN { # Simulate echo(1)
for (i = 1; i < ARGC; i++) printf "%s ", ARGV[i]
printf "\n"
exit }
SEE ALSO
egrep(1), lex(1), sed(1), atan2(3), cos(3), exp(3), log(3), sin(3),
sqrt(3), strftime(3), time(3)
A. V. Aho, B. W. Kernighan, P. J. Weinberger, The AWK Programming
Language, Addison-Wesley, 1988. ISBN 0-201-07981-X
AWK Language Programming, Edition 1.0, published by the Free Software
Foundation, 1995
HISTORY
nawk has been the default system awk since NetBSD 2.0, replacing the pre-
viously used GNU awk.
BUGS
There are no explicit conversions between numbers and strings. To force
an expression to be treated as a number add 0 to it; to force it to be
treated as a string concatenate "" to it.
The scope rules for variables in functions are a botch; the syntax is
worse.
NetBSD 2.0 June 5, 2004 NetBSD 2.0
Powered by man-cgi (2025-08-05).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
什么是穿堂风hcv8jop3ns1r.cn |
阿赖耶识是什么意思ff14chat.com |
阳痿早泄吃什么药最好hcv8jop4ns0r.cn |
反酸水是什么原因hcv9jop2ns1r.cn |
为什么会得静脉曲张hcv8jop6ns3r.cn |
献血有什么好处和坏处hcv8jop1ns5r.cn |
不堪入目是什么意思hcv8jop0ns5r.cn |
脂膜炎是什么原因引起的helloaicloud.com |
芒种是什么季节hcv9jop6ns6r.cn |
文采是什么意思hcv8jop5ns0r.cn |
尿频吃什么药最快见效hcv8jop9ns8r.cn |
八月八号什么星座hcv9jop2ns4r.cn |
腰无力是什么原因hcv8jop5ns6r.cn |
红肉是指什么肉hcv9jop7ns9r.cn |
狗不理是什么意思xscnpatent.com |
盆底脱垂有什么症状hcv8jop1ns3r.cn |
什么鱼做酸菜鱼最好吃hcv8jop6ns1r.cn |
甲功不正常有什么表现hcv8jop0ns0r.cn |
3月1日是什么星座hcv8jop8ns2r.cn |
支气管炎性改变是什么意思cj623037.com |
百度