shell study daily
############################
官方解释:Awk is a scripting language used for manipulating data and generating reports. The awk command programming language requires no compiling and allows the user to use variables, numeric functions, string functions, and logical operators.
1)一行一行扫描文件
2)每一行输入分隔成域(字段)
3)匹配输入的行或域
4)对匹配的行执行操作
1)转换数据文件
2)产生格式化的报告
1)格式化输出行
2)算术和字符串运算
3)条件与循环
样例5:awk 'BEGIN {for(i=1;i<=5;i++) print "square of", i, "is", i*i}' # 打印出1~5的平方,不是从文件中读的内容,需要有BEGIN标识
############################
官方解释:SED command in UNIX is stands for stream editor and it can perform lot’s of function on file like, searching, find and replace, insertion or deletion.
############################