Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support Help parsing log from vertical to horizontal line Post 302936733 by justbow on Friday 27th of February 2015 09:26:27 AM
Old 02-27-2015
a little bit different but still doesnt work.

Code:
awk '/recordOpeningTime \:/ {ts=$3}
     /servedMSISDN \:/ {print ts", "$3; ts="" }
     /ratingGroup \:/ {print ts", "$3; ts="" }
     /datavolumeFBCUplink \:/ {print ts", "$3; ts="" }
     /datavolumeFBCDownlink \:/ {print ts", "$3; ts="" }'

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

converting horizontal line to vertical line

how to use "tr" command to display horizontal line to vertical line for vertical to horizontal, the command is tr '\n' '\t' <inputfile but what is the command for horizontal to vertical Thanks Vasikaran (3 Replies)
Discussion started by: vasikaran
3 Replies

2. Shell Programming and Scripting

Draw a Horizontal and Vertical line on UNIX

I want to draw a horizontal and vertical line on Unix. Please suggest some solution. (11 Replies)
Discussion started by: allways4u21
11 Replies

3. Shell Programming and Scripting

Need help in changing vertical lines to horizontal line in a file

Hi, I have a file like below robert PREF: 3 AVAIL: henry PREF: 234 AVAIL: john PREF: 145,178 AVAIL: 123 matt PREF: 564,932 AVAIL: ten PREF: 389 AVAIL: kill (2 Replies)
Discussion started by: rocky1954
2 Replies

4. UNIX for Dummies Questions & Answers

Horizontal to vertical

Hi, Silly question, if I have an excel file that looks something like this: ................. Subject 1 Subject 2 Subject 3 Subject 4 Fever..............13...........9.............23..........14 Headache.........2............12...........18..........23... (3 Replies)
Discussion started by: Xterra
3 Replies

5. UNIX for Dummies Questions & Answers

How to move vertical line to Horizontal...

How to move a vertical line to Horizontal line.....Can i use a tr command? code is: StudentID Java .Net C# I want to move this line like this: StudentID Java .Net C# Please use code tags! (3 Replies)
Discussion started by: Arsh10
3 Replies

6. Shell Programming and Scripting

change log vertical to horizontal lines

Hi, Need help unix command to change this : become this Anyone can help me?:wall: (2 Replies)
Discussion started by: justbow
2 Replies

7. Shell Programming and Scripting

Need perl or shell script to sort vertical lines to horizontal line in csv format

Need perl or shell script to sort vertical lines to horizontal line in csv format My file like below ------------------------- ================================================================================ PATH PINKY1000#I1-1-ZENTA1000-2#I7-1-ASON-SBR-UP-943113845 ... (4 Replies)
Discussion started by: sreedhargouda.h
4 Replies

8. Shell Programming and Scripting

Script for parsing vertical log into horizontal

Hi, I have log like this : And i want the output like below : I have try using awk but doesn't work awk ' /ffff /{ts=$1} f && /SectorAntenna\=1/{sa1=$3} f && /SectorAntenna\=2/{sa2=$3} f && /SectorAntenna\=3/{sa3=$3} { s= ts "|" sa1 "|" sa2 "|" sa3 print s f=0 }' (7 Replies)
Discussion started by: justbow
7 Replies

9. Shell Programming and Scripting

How do i do the vertical to horizontal??

51009 8746 8912 17986 20315 24998 5368 38934 7805 8566 (4 Replies)
Discussion started by: nikhil jain
4 Replies

10. Shell Programming and Scripting

Change the vertical logs to horizontal line

Hi, cat log EPC-SubsId: 3333 EPC-GrIds: RTGHUPA:1:15-11-2013T19:59,22-11-2013T19:59 EPC-GrIds: PrimaXGB_23:10 EPC-SubsId: 4444 EPC-GrIds: RTGHUPB:1:15-11-2013T19:59,22-11-2013T19:59 EPC-SubId: 5555 EPC-GrIds: RTGHUPC:1:15-11-2013T19:59,22-11-2013T19:59 EPC-SubsId: 6666... (1 Reply)
Discussion started by: justbow
1 Replies
Tree::Simple::Visitor::PostOrderTraversal(3pm)		User Contributed Perl Documentation	    Tree::Simple::Visitor::PostOrderTraversal(3pm)

NAME
Tree::Simple::Visitor::PostOrderTraversal - A Visitor for post-order traversal a Tree::Simple hierarchy SYNOPSIS
use Tree::Simple::Visitor::PostOrderTraversal; # create an visitor my $visitor = Tree::Simple::Visitor::PostOrderTraversal->new(); # pass our visitor to the tree $tree->accept($visitor); # print our results print join ", " => $visitor->getResults(); # this will print this: # 1.1.1 1.1 1.2 1 2.1 2 3.1 3 # assuming your tree is like this: # 1 # 1.1 # 1.1.1 # 1.2 # 2 # 2.1 # 3 # 3.1 DESCRIPTION
Post-order traversal is a variation of the depth-first traversal in which the sub-tree's are processed before the parent. It is another alternative to Tree::Simple's "traverse" method which implements a depth-first, pre-order traversal. METHODS
new There are no arguments to the constructor the object will be in its default state. You can use the "setNodeFilter" method to customize its behavior. includeTrunk ($boolean) Based upon the value of $boolean, this will tell the visitor to include the trunk of the tree in the traversal as well. setNodeFilter ($filter_function) This method accepts a CODE reference as its $filter_function argument and throws an exception if it is not a code reference. This code reference is used to filter the tree nodes as they are collected. This can be used to customize output, or to gather specific information from a more complex tree node. The filter function should accept a single argument, which is the current Tree::Simple object. visit ($tree) This is the method that is used by Tree::Simple's "accept" method. It can also be used on its own, it requires the $tree argument to be a Tree::Simple object (or derived from a Tree::Simple object), and will throw and exception otherwise. getResults This method returns the accumulated results of the application of the node filter to the tree. BUGS
None that I am aware of. Of course, if you find a bug, let me know, and I will be sure to fix it. CODE COVERAGE
See the CODE COVERAGE section in Tree::Simple::VisitorFactory for more inforamtion. SEE ALSO
These Visitor classes are all subclasses of Tree::Simple::Visitor, which can be found in the Tree::Simple module, you should refer to that module for more information. AUTHOR
stevan little, <stevan@iinteractive.com> COPYRIGHT AND LICENSE
Copyright 2004, 2005 by Infinity Interactive, Inc. <http://www.iinteractive.com> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2005-07-14 Tree::Simple::Visitor::PostOrderTraversal(3pm)
All times are GMT -4. The time now is 08:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy