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

NOTE: When using the integer format-control letters for values that are outside the range of a C?long?integer,?gawk?switches to the?%g?format specifier. If?--lint?is provided on the command line?gawk?warns about this. Other versions of?awk?may print invalid values or do something else entirely.

Optional,additional parameters may lie between the?%?and the control letter:

count$ count’th argument at this point in the formatting. This is called a?positional specifier?and is intended primarily for use in translated versions of format strings,not in the original text of an AWK program. It is a?gawk?extension.spacewidthprecThe dynamic?width?and?prec?capabilities of the?ANSI?C?printf()?routines are supported. A*?in place of either the?width?or?prec?specifications causes their values to be taken from the argument list to?printf?or?sprintf(). To use a positional specifier with a dynamic width or precision,supply the?count$?after the?*?in the format string. For example,"%3$*2$.*1$s".

Special File Names

When doing I/O redirection from either?print?or?printf?into a file,or via?getline?from a file,?gawk?recognizes certain special filenames internally. These filenames allow access to open file descriptors inherited from?gawk’s parent process (usually the shell). These file names may also be used on the command line to name data files. The filenames are:

Description
nn.These are particularly useful for error messages. For example:

print "You blew it!" > "/dev/stderr"

whereas you would otherwise have to use

print "You blew it!" | "cat 1>&2"

(编辑:ASP站长)

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

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