shell awk
时间:2017-01-15 19:32:14
收藏:0
阅读:286
每行操作
cat 1.log|while read line; do
NAME=`awk ‘BEGIN {split("‘"$line"‘",arr);print arr[1]}‘`
ID=`awk ‘BEGIN {split("‘"$line"‘",arr);print arr[2]}‘`
done
按列操作思想
cat file | grep "define" | awk ‘{print $2}‘
原文:http://www.cnblogs.com/chencesc/p/6287592.html
评论(0)