s15293146:/home/sona/100625-reliance-reinvite# s15293146:/home/sona/100625-reliance-reinvite# egrep -n "sip:37410546747" 100627.160243.ngrep.log.txt 12419:INVITE sip:37410546747@220.224.129.21:5060 SIP/2.0. 12425:To: . 12454:To: . 12494:CANCEL sip:37410546747@220.224.129.21:5060 SIP/2.0. 12498:To: . 12511:To: ;tag=aprq35qllr2-1tg36g20000gc. 12521:To: ;tag=97.56.30.751088+1+ea6b016f+534736f0. 12527:Contact: . 12533:ACK sip:37410546747@220.224.129.21:5060 SIP/2.0. 12537:To: ;tag=97.56.30.751088+1+ea6b016f+534736f0. 14882:INVITE sip:37410546747@220.224.129.21:5060 SIP/2.0. 14888:To: . 14917:To: . 14970:To: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 14976:Contact: . 15056:To: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 15064:Contact: . 15082:ACK sip:37410546747@220.224.129.21:5060;transport=udp SIP/2.0. 15087:To: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 16011:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 16015:Contact: . 16041:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 16053:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 16078:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 16081:Contact: . 17095:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 17099:Contact: . 17125:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 17137:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 17162:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 17165:Contact: . 18537:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 18541:Contact: . 18567:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 18579:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 18604:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 18607:Contact: . 19596:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 19600:Contact: . 19626:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 19638:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 19663:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 19666:Contact: . 20522:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 20526:Contact: . 20552:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 20564:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 20589:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 20592:Contact: . 21415:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. 21429:From: ;tag=97.56.30.751064+1+72cb0041+305c70f4. s15293146:/home/sona/100625-reliance-reinvite# s15293146:/home/sona/100625-reliance-reinvite# $ i=1000; cat 100627.160243.call-sample.txt | while read s; do echo $s | grep -q "^U " && i=$((i+1)); echo $s >> $i.txt; done $ u2d 1???.txt $ for f in 1???.txt; do grep -q 37410546747 $f && echo $f; done 1001.txt 1002.txt 1005.txt 1009.txt 1010.txt 1060.txt 1061.txt 1062.txt 1063.txt 1118.txt 1119.txt 1120.txt 1121.txt 1194.txt 1195.txt 1196.txt 1197.txt 1252.txt 1253.txt 1254.txt 1255.txt 1298.txt 1299.txt 1300.txt 1301.txt 1346.txt 1347.txt $ for f in 1???.txt; do grep -q 37410546747 $f || rm $f; done $ i=2000; for f in 1???.txt; do mv $f $i.txt; i=$((i+1)); done