弱弱的问一句awk跟sed的区别是什么
时间:2011-05-13
来源:互联网
作者: chinaboywg 发布时间: 2011-05-13
确实很弱哦..

占个沙发了....
区别嘛...对于高手来说没什么区别,
个人意见: awk更灵活,细致 ..
作者: 南极雨 发布时间: 2011-05-13
Both are tools that transform text. BUT awk can do more things besides just manipulating text. Its a programming language by itself with most of the things you learn in programming, like arrays, loops, if/else flow control etc You can "program" in sed as well, but you won't want to maintain the code written in it.
2) What kind of application are best use cases for sed and awk tools ?
Conclusion: Use sed for very simple text parsing. Anything beyond that, awk is better. In fact, you can ditch sed altogether and just use awk. Since their functions overlap and awk can do more, just use awk. You will reduce your learning curve as well.
awk is oriented toward delimited fields on a per-line basis. It has much more robust programming constructs including if/else, while, do/while and for (C-style and array iteration). There is complete support for variables and single-dimension associative arrays plus (IMO) kludgey multi-dimension arrays. Mathematical operations resemble those in C. It has printf and functions. The "K" in "AWK" stands for "Kernighan" as in "Kernighan and Ritchie" of the book "C Programming Language" fame (not to forget Aho and Weinberger). One could conceivably write a detector of academic plagiarism using awk.
作者: xiaopan3322 发布时间: 2011-05-13
作者: dzhxc 发布时间: 2011-05-13
:emn10:
作者: ajdan4q 发布时间: 2011-05-13
作者: zooyo 发布时间: 2011-05-13

作者: yinyuemi 发布时间: 2011-05-13
zooyo 发表于 2011-05-13 10:43
说不清楚也得说 面试问的 难道你回答 说不清楚吗?
作者: chinaboywg 发布时间: 2011-05-13
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28