常用AWK命令

常用AWK命令##


Awk is a programming language which allows easy manipulation of structured data and the generation of formatted reports. Awk stands for the names of its authors Aho, Weinberger, and Kernighan.


###一、什么是AWK

USAGE:

    Unix:  awk '/pattern/ {print "$1"}'    # standard Unix shells
 DOS/Win:  awk '/pattern/ {print "$1"}'    # okay for DJGPP compiled
           awk "/pattern/ {print \"$1\"}"  # required for Mingw32

二、AWK 查找/Search 与 替换/Substitute

参考:
1、Awk One-Liners Explained, Part II: Text Conversion and Substitution
2、awk cheat sheet

三、AWK编程

REFER:使用AWK去掉重复的单词

參考:


1、The GNU Awk User’s Guide
2、8 Powerful Awk Built-in Variables
3、Awk Introduction Tutorial – 7 Awk Print Examples

posted @ 2016-08-30 10:28  xiulug  阅读(265)  评论(0编辑  收藏  举报