Sponsored Content
Full Discussion: iterative parsing
Top Forums Shell Programming and Scripting iterative parsing Post 302496785 by jouuu on Tuesday 15th of February 2011 09:21:01 AM
Old 02-15-2011
iterative parsing

I have always struggled when parsing a file vertically vs. by line horizontally. Can't seem to get my head around the concept. Here again I need to convert vertical output to horizontal output.

original output
Code:
root@acuransx:bpplsched 2000-STAND3 -v -M acuransx -l
<2>bpplsched: INITIATING: version NetBackup 6.5 created: 2010042404
 
SCHED Yearly 0 1 15724800 8 0 0 0 *NULL* 0 0 0 0 0 0 -1 0 
SCHEDWIN 0 0 0 0 64800 54000 0 0 0 0 0 0 0 0
SCHEDRES *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* *NULL*
SCHEDPOOL *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* *NULL*
SCHEDRL 8 1 1 1 1 1 1 1 1 1
SCHEDFOE 0 0 0 0 0 0 0 0 0 0
SCHEDSG *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* 
 
SCHED Monthly 0 1 1209600 6 0 0 0 *NULL* 0 0 0 0 0 0 -1 0 
SCHEDWIN 0 0 0 0 64800 54000 0 0 0 0 0 0 0 0
SCHEDRES *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* 
SCHEDPOOL *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* 
SCHEDRL 6 1 1 1 1 1 1 1 1 1
SCHEDFOE 0 0 0 0 0 0 0 0 0 0
SCHEDSG *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* 
 
SCHED DAILY 1 1 86400 3 0 0 0 *NULL* 0 0 0 0 0 0 -1 0 
SCHEDWIN 72000 46800 72000 46800 0 0 72000 46800 72000 46800 72000 46800 72000 46800
SCHEDRES *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* 
SCHEDPOOL *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* 
SCHEDRL 3 1 1 1 1 1 1 1 1 1
SCHEDFOE 0 0 0 0 0 0 0 0 0 0
SCHEDSG *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* 
 
SCHED Weekly 0 1 86400 2 0 0 0 *NULL* 0 0 0 0 0 0 -1 0 
SCHEDWIN 0 0 0 0 64800 54000 0 0 0 0 0 0 0 0
SCHEDRES *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* *NULL*
SCHEDPOOL *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* 
SCHEDRL 2 1 1 1 1 1 1 1 1 1
SCHEDFOE 0 0 0 0 0 0 0 0 0 0
SCHEDSG *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* *NULL* 
<2>bpplsched: EXIT status = 0

SCHED to SCHEDSG represents one schedule. I need to map out each schedule horzintally
example:
Code:
Yearly 15724800 0 0 64800 0 0 0 0 SCHEDPOOL SCHEDRL SCHEDFOE SCHEDSG 
Monthly 1209600 0 0 64800 0 0 0 0 SCHEDPOOL SCHEDRL SCHEDFOE SCHEDSG 
DAILY 86400 72000 72000 0 72000 72000 72000 72000 SCHEDPOOL SCHEDFOE SCHEDRL SCHEDSG 
Weekly 86400 0 0 64800 0 0 0 0 SCHEDPOOL SCHEDRL SCHEDFOE SCHEDSG

Your assistance is greatly appreciated.

Last edited by Franklin52; 02-15-2011 at 10:26 AM.. Reason: Please use code tags, thank you
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

parsing

Hi, I want to parse this file.... ( 0 , 0 ) =>heading1 ( 0 , 1 ) =>value1.1a ( 0 , 2 ) =>value2.1a ( 1 , 0 ) =>heading2 ( 1 , 1 ) =>value1.1b ( 1 , 2 ) =>value2.1b ( 2 , 0 ) =>heading3 ( 2 , 1 ) =>value1.1c ( 2 , 2 ) =>value2.1c ( 3 , 0 ) =>heading4 ( 3 , 1 ) =>value1.1d ( 3 , 2... (15 Replies)
Discussion started by: tungaw2004
15 Replies

2. Shell Programming and Scripting

Parsing question

Hi Guys, I was wondering if you could help me out - I have a directory /home/users/datafiles/ which contain files "dat dd-mm-yy.xls" I am trying to write a script which does the following - (1) loops through all the files (2) retrieves the dd-mm-yy string and converts it into a... (12 Replies)
Discussion started by: muser
12 Replies

3. Shell Programming and Scripting

Need some help with parsing

I have a big xml file with little formatting in it. It contains over 600 messages that I need to break each message out in its own separate file. The xml file looks in the middle of it something like this: </Title></Msg><Msg><Opener> Hello how are you?<Title> Some says hello</Title><Body>... (3 Replies)
Discussion started by: quixoticking11
3 Replies

4. Shell Programming and Scripting

Perl parsing compared to Ksh parsing

#! /usr/local/bin/perl -w $ip = "$ARGV"; $rw = "$ARGV"; $snmpg = "/usr/local/bin/snmpbulkget -v2c -Cn1 -Cn2 -Os -c $rw"; $snmpw = "/usr/local/bin/snmpwalk -Os -c $rw"; $syst=`$snmpg $ip system sysName sysObjectID`; sysDescr.0 = STRING: Cisco Internetwork Operating System Software... (1 Reply)
Discussion started by: popeye
1 Replies

5. Shell Programming and Scripting

Iterative operation

grep -o '\{1,3\}\.\{1,3\}\.\{1,3\}\.\{1,3\}' then how do i iterate the file names?? (19 Replies)
Discussion started by: ravis83
19 Replies

6. Shell Programming and Scripting

Need help with some iterative file processing

Gurus - Please help with this urgent situation. I have the following problem to solve using a shell script: 1. There are about 13 files named CONTAINER_1.lst, CONTAINER_2.lst, CONTAINER_3.lst .....CONTAINER_13.lst 2. Each of these files contain about 8 lines (in most cases) containing... (1 Reply)
Discussion started by: inditopgun
1 Replies

7. Shell Programming and Scripting

Parsing the data

Hi I need to parse the following data using shell script Table ----- stage4n_abc 48 stage4o_abcd 4 adashpg_abc_HeartBeat 1 stage4l_asc 168 Can anyone gimme the solution. I want each value to get stored in an array or variable and want the value to be greped from another file.... (1 Reply)
Discussion started by: Archana.Dheepan
1 Replies

8. Shell Programming and Scripting

Iterative statement to cut values from a line

Hi I am new to shell scripting and trying to get values from a text file, I have a text file with values seperated with "|". like aga|120220090525|120220090525|120220090525|120220090530 bab|120220090530|120220090530|120220090535|120220090535|120220090535... (4 Replies)
Discussion started by: mannepalli
4 Replies

9. Shell Programming and Scripting

Parsing of file for Report Generation (String parsing and splitting)

Hey guys, I have this file generated by me... i want to create some HTML output from it. The problem is that i am really confused about how do I go about reading the file. The file is in the following format: TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies

10. Shell Programming and Scripting

parsing

Can some body show me a sed command to remove everyhing upto a '/' and leave the rest of the line. cat data.out This is the directory /tmp/xxx/yy.ksh I only want to get the fullpath name /tmp/xxx.yy.ksh Thanks in advance to all who answer. (3 Replies)
Discussion started by: BeefStu
3 Replies
XmComboBox(3)							  LessTif Manuals						     XmComboBox(3)

NAME
XmComboBox - Motif-compatible combination-box widget SYNOPSIS
#include <Xm/ComboBox.h> XmComboBox XmCreateComboBox DESCRIPTION
XmComboBox X RESOURCES
Name Class Type Default Access --------------------------------------------------------------------------------------- XmNarrowSize XmCArrowSize HorizontalDimension NULL CSG XmNarrowSpacing XmCArrowSpacing HorizontalDimension NULL CSG XmNcomboBoxType XmCComboBoxType ComboBoxType NULL CSG XmNfontList XmCFontList FontList NULL CSG XmNhighlightThickness XmCHighlightThickness HorizontalDimension NULL CSG XmNmarginWidth XmCMarginWidth HorizontalDimension NULL CSG XmNmarginHeight XmCMarginHeight VerticalDimension NULL CSG XmNmatchBehavior XmCMatchBehavior MatchBehavior NULL CSG XmNrenderTable XmCRenderTable RenderTable NULL CSG XmNselectedItem XmCSelectedItem XmString NULL CSG XmNselectedPosition XmCSelectedPosition Int 0 CSG XmNselectionCallback XmCCallback Callback NULL CSG XmNshadowThickness XmCShadowThickness HorizontalDimension NULL CSG XmNarrowSize XmNarrowSpacing XmNcomboBoxType XmNfontList XmNhighlightThickness XmNmarginWidth XmNmarginHeight XmNmatchBehavior XmNrenderTable XmNselectedItem XmNselectedPosition XmNselectionCallback XmNshadowThickness CLASS HIERARCHY
Object(3) Rect(3) UnNamedObj(3) Core(3) Composite(3) Constraint(3) XmManager(3) XmComboBox(3) CALLBACKS
CONVENIENCE FUNCTIONS
SEE ALSO
LessTif Project April 1998 XmComboBox(3)
All times are GMT -4. The time now is 12:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy