awk入门及进阶 : 文本处理三剑客 : grep sed awk grep : 文本过滤器 grep 'pattern' input_file ... sed : 流编辑器 awk :报告生成器 格式化以后,显示 gawk nawk new awk awk用法 : awk [options] 'script' file1 file2,... awk [options] 'PATTERN {action}' file1,file2,... action : print,printf awk '{print $1,$2}' test.txt awk 'BEGIN{OFS="#"} {print $1,$2}' test.txt