摘要: 这篇主要讲awkbasic syntax of awk:awk 'BEGIN {start_action} {action} END {stop_action}' filename(1) awk '{print $1}' input_fileprint first column in each row as shown below(2) awk '{BEGIN {sum=0}{sum=sum+$5}END{print sum}' filenameprint the sum of the value in the 5th column(3) awk 阅读全文
posted @ 2012-06-19 16:13 cuero 阅读(312) 评论(0) 推荐(0) 编辑