參考網址
http://lalakiwe.myweb.hinet.net/Documents/sed/sed_4.html
grep -r "\[0\] '.*'" * > ../CG.csv //Parse出所需要的Raw data
Purpose: Only capture VLR from each line. Remove the redundancy and only preserve one pattern
Raw data
STFIOP1-C20111122.0045+0200-20111122.0100+0200.txt:40330 15: [0] 'VLR.48613441307'
CMD:
sed -e '/.*[0] .*\..*/!d' CG.csv > filenameabc //刪除[0] 'xxx'樣式,保留[0] 'xxx.xxxxxx'樣式
sed 's/^.*\[0\] //g' CG.csv | sed 's/\..*$//g' //把xxx抓出來
sort filename
uniq filename
*sort command is very useful, check here for more info.
沒有留言:
張貼留言