/build/static/layout/Breadcrumb_cap_w.png

how to filter out keyword values from a text file so that we can make excel sheet.... i have highlighted the values which i need in excel sheet

 FLAGS          : FIRST      CHARGE     ANSWER     CONN                 
 OWNER DN       : 1292433355                                            
 CALLING PARTY  : 1292433355                                            
 NADI: 3  =NATIONAL NUMBER        NPI: 1=ISDN NUMBERING PLAN 
 SCR.IND.: 3=NETWORK PROVIDED         PRES.IND.: 0=ALLOWED       
 CALLED PARTY   : 61434045186                                           
 NADI: 4  =INTERNATIONAL NUMBER   NPI: 1=ISDN NUMBERING PLAN 
 DATE TIME DURAT: 2011-09-05  08:55:08 0   ENDTIME SECURE       1194 SEC
 PARTNER DN     : 0061434045186                                         
 ZONE/CHARGEBAND: ZONE= 33   CHB=                                       
 CHARGE UNITS   : CONN= 200                         
 CONNECTION ID  : H'7D08282E   

0 Comments   [ + ] Show comments

Answers (1)

Posted by: genfoch01 9 years ago
Orange Senior Belt
0
I would install grep for windows  http://gnuwin32.sourceforge.net/packages/grep.htm  or cygwin https://www.cygwin.com/

either way from the command prompt you can filter the text file and pull the lines you need

grep for windows
type filename | grep -i -e "owner dn" -e "date time durat" -e "partner dn" -e "zone/charge" -e "charge units" > newfile

cygwin
cat filename  | grep -i -e "owner dn" -e "date time durat" -e "partner dn" -e "zone/charge" -e "charge units" > newfile

either way newfile ends up with the highlighted data you were looking for.
| grep -i -e "owner dn" -e "date time durat" -e "partner dn" -e "zone/charge" -e "charge units" > newfile - See more at: http://www.itninja.com/question/how-to-filter-out-keyword-values-from-a-text-file-so-that-we-can-make-excel-sheet-i-have-highlighted-the-values-which-i-need-in-excel-sheet#sthash.qU2s26pA.dpuf
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ