Running awk Without Input Files【每日一译】--20130204
来源:互联网 发布:大数据开源项目 编辑:程序博客网 时间:2024/05/17 01:09
You can also runawk without any input files. If you type the following command line:
可以没有输入文件参数的使用AWK,如果你输入以下的命令行:
awk 'program'
awk applies the program to the standard input, which usually means whatever you type on the terminal. This continues until you indicate end-of-file by typingCtrl-d. (On other operating systems, the end-of-file character may be different. For example, on OS/2, it isCtrl-z.)
awk编程对应用于标准输入,一般是指我们经常输入在终端的内容。它持续到你输入结束文件的指示命令通过输入”CTRL-D“(在其它操作系统,结束文件的标识符可能不同如在OS/2操作系统中为"CTRL-Z";
As an example, the following program prints a friendly piece of advice (from Douglas Adams'sThe Hitchhiker's Guide to the Galaxy), to keep you from worrying about the complexities of computer programming7 (BEGIN
is a feature we haven't discussed yet):
举例,以下的程序输入一个友好的提示条,为了让于免于担心复杂的电脑编程(BEGIN是一个功能目前我们还未讨论到):
$ awk "BEGIN { print \"Don't Panic!\" }" -| Don't Panic!
This program does not read any input. The ‘\’ before each of the inner double quotes is necessary because of the shell's quoting rules—in particular because it mixes both single quotes and double quotes.8
这个程序不读入任何输入文件。“\"符号在每个内双引前是必须的,因为在SHELL中的引号语法规定的---尤其是它混合了双引和单引的情况;
- Running awk Without Input Files【每日一译】--20130204
- Control Files Undo Segments【每日一译】--2012-11-06
- awk零碎1【每日一译】--2013-02-01
- index in array-AWK碎片【每日一译】--20130203
- Using BACKUP ARCHIVELOG with DELETE INPUT or DELETE ALL INPUT【每日一译】--20121115
- Introduction to Tablespaces, Datafiles, and Control Files【每日一译】--2012-10-28
- Initialization Parameter Files for an Oracle ASM Instance【每日一译】--20130206
- Basic Example of an Array OF AWK 【每日一译】--2013-01-27
- AWK-BEGIN and END Special Patterns【每日一译】--2013-1-31
- Conversion of Strings and Numbers-AWK零碎2--【每日一译】--20130202
- 【AWK】Scanning all Elements of an Array--每日一译2013-02-05
- Running Go without installation
- 每日一命令(11)ln - make links between files
- 每日一译
- 每日一译.6.28
- move running files in windows
- Input/Output with files
- Input/Output with files
- NYOJ--290--动物统计加强版(字典树简单运用)
- LoadLibrary调用失败原因
- 排序算法之直接插入排序
- JPA概要
- TortoiseSVN :提交后,如何修改log
- Running awk Without Input Files【每日一译】--20130204
- 安家第一篇测试
- Ubuntu 中软件的安装、卸载以及查看的方法总结
- Oracle默认帐号密码
- ASP.NET数据库连接字符串总结
- android selector背景选择器
- hdu--1251--统计难题(字典树简单)
- HDU 2896 病毒侵袭 【AC自动机】
- 虚拟机vmware安装win2003