telephonyserverplugins/multimodetsy/group/gettxrx.pl
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 # Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 # All rights reserved.
       
     3 # This component and the accompanying materials are made available
       
     4 # under the terms of "Eclipse Public License v1.0"
       
     5 # which accompanies this distribution, and is available
       
     6 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 #
       
     8 # Initial Contributors:
       
     9 # Nokia Corporation - initial contribution.
       
    10 #
       
    11 # Contributors:
       
    12 #
       
    13 # Description:
       
    14 # Perl script to strip out the Tx: and Rx: information from a GSMTSY.TXT log file
       
    15 # 
       
    16 #
       
    17 
       
    18 my $line;
       
    19 my $txrx = 0;
       
    20 my $lastx;
       
    21 while ($line=<>)
       
    22 	{
       
    23 	if ($line =~ /^\d\d\.\d\d:\d\d:\d\d\d\d\d\d/)
       
    24 		{
       
    25 		$line = substr $line,16;
       
    26 		$txrx = 0;
       
    27 		if ($line =~ /^(.)x:\t/)
       
    28 			{
       
    29 			if ($lastx eq $1)
       
    30 				{
       
    31 				$line = substr $line,4;
       
    32 				}
       
    33 			print $line;
       
    34 			$txrx = 1;
       
    35 			$lastx = $1;
       
    36 			}
       
    37 		next;
       
    38 		}
       
    39 	if ($txrx)
       
    40 		{
       
    41 		print $line;
       
    42 		}
       
    43 	}