文本处理1

a,b,c,d,e
1,2,"3,4,5",6,7       >a.txt

 

grep [a-z] a.txt|cut -d',' -f3 && grep [0-9] test.txt |cut -d'"' -f2

sed -r 's/([a-z0-9]+,){2}"?([^"]*)"?(,[0-9a-z]){2}$/\2/' a.txt

posted @ 2015-06-11 14:31  玩石  阅读(118)  评论(0编辑  收藏  举报