Dear All I have captured a file in my centos showing logs captured from many modules concurrently. Please find attached a sample of the file. As you see, there are logs from individual modules that have been captured concurrently. For example, there are logs from IPTR,SNMP,HLR,TCAP,XAPP,and SCCP modules but they are coming concurrently.Each log has the header name of its accompanied module in the beginning. I need to have the log of each modules separately. Can you please show me the power of centos on how to separate individual module's logs from the whole? Thank you -------------- next part -------------- A non-text attachment was scrubbed... Name: Edit3 Type: application/octet-stream Size: 4678 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20101129/5d77b04c/attachment-0001.obj>
On Mon, Nov 29, 2010 at 2:58 PM, hadi motamedi <motamedi24 at gmail.com> wrote:> Dear All > I have captured a file ?in my centos showing logs captured from many > modules concurrently. Please find attached a sample of the file. As > you see, there are logs from individual modules that have been > captured concurrently. For example, there are logs from > IPTR,SNMP,HLR,TCAP,XAPP,and SCCP modules but they are coming > concurrently.Each log has the header name of its accompanied module in > the beginning. I need to have the log of each modules separately. Can > you please show me the power of centos on how to separate individual > module's logs from the whole?What program do you use for it? Wireshark? I don't think the OS would care?
From: hadi motamedi <motamedi24 at gmail.com>> I have captured a file in my centos showing logs captured from many > modules concurrently. Please find attached a sample of the file. As > you see, there are logs from individual modules that have been > captured concurrently. For example, there are logs from > IPTR,SNMP,HLR,TCAP,XAPP,and SCCP modules but they are coming > concurrently.Each log has the header name of its accompanied module in > the beginning. I need to have the log of each modules separately. Can > you please show me the power of centos on how to separate individual > module's logs from the whole?Here is "The Power of CentOS"!!! (in approximately 3 minutes...) cat edit.txt | while read LINE; do echo "$LINE" | grep -q '>\.\.' if [ $? -eq 0 ]; then LOGFILE=`echo $LINE | cut -d' ' -f1`.log else echo "$LINE" >> $LOGFILE fi done JD PS: I wonder if I am doing your school homework...