日期:2014-05-16 浏览次数:20607 次
awk -F\| '/./{print $1 "|" $2 "|." $3 "."}' yourDataFile
------解决方案--------------------
awk -F\| 'BEGIN{OFS="|"}{$3="."$3"."; print $0}' infilename > outfilename
如:#cat aa
145608514|8966854|3
12419277|11268992|122
#awk -F\| 'BEGIN{OFS="|"}{$3="."$3"."; print $0}' aa
145608514|8966854|.3.
12419277|11268992|.122.
#awk -F\| 'BEGIN{OFS="|"}{$3="."$3"."; print $0}' aa > bb
#cat bb
145608514|8966854|.3.
12419277|11268992|.122.