Sponsored Content
Full Discussion: problem parsing output file
Top Forums Shell Programming and Scripting problem parsing output file Post 302111288 by sb008 on Tuesday 20th of March 2007 02:07:58 PM
Old 03-20-2007
There is no way to correct it based on the concept as presented.

For the simple reason that some fields have an value with a length which exceeds the length for the specific field as indicated by the "dash" line.

There might be another way to parse it correctly into the format which you desire. However to do so, there needs to be a method which identifies exactly to which column a specific value belongs.

I would have to see the full input file, that is exactly as it is with the right amount of spaces shown, to see if there is a way to parse the file correct.

Probably the easiest option would be if your "srvrmgr" command would generate output with the correct format. That is all fields either have a fixed length or your the dashes in the dashed line have at least as many dashes for each field as the longest output value for that specific field.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

problem parsing process-output

HI all! I have a problem parsing the output of another process. The output is like this (C): printf("\rCheck exist: %d/%d",idx,pBF->NBits()); The aim of the script I'm coding is to save in a separate file the last output line of first process. This is the script now (Shell script): ... (3 Replies)
Discussion started by: victorin
3 Replies

2. Shell Programming and Scripting

Problem parsing line in file

I am VERY new to unix scripting. I am having trouble parsing a line into fields for further processing. I have this script: #bin/sh cat ztest2.txt | while read line do zvar1=`echo $line | cut -f6` echo "zvar1 is " $zvar1 done ******************** ztest2.txt looks like: 1 ... (2 Replies)
Discussion started by: rlwilli
2 Replies

3. Shell Programming and Scripting

Problem with parsing a large file

Hi All, Following is the sample file and following is the op desired that is the last entry of each unique first field is required. My solution is as follows However the original file has around a million entries and around a 100,000 uniques first fields, so this soln.... (6 Replies)
Discussion started by: gauravgoel
6 Replies

4. Shell Programming and Scripting

parsing output

I have a file that contains the output of the ls -iR command, something like this: ./results: 2504641011 result_1410 2500957642 result_525 2504641012 result_1425 2500957643 result_540 ./tests/1: 2500788755 1 2500788743 1000 ./tests/2: 2500788759 3 2500788758 999 ... (6 Replies)
Discussion started by: looza
6 Replies

5. Shell Programming and Scripting

need help in Parsing a CSV file and generate a new output file

Hi Scripting Gurus, I am trying to parse a csv file and generate a new output file. The input file will be a variable length in turns of rows and columns. output file will have 8 columns. we have three columns from the header for each set. just to give little bit more clarification each row... (15 Replies)
Discussion started by: vkr
15 Replies

6. Shell Programming and Scripting

Parsing output

I need to parse the following out put and determine if the USB is a DISK and whether or not it's External. If an HBA line contains "USB" then does the next line contain "DISK" and "External". 0:0,31,0: HBA : (aacraid,1) AAC SCSI 0,0,0: DISK : Adaptec ASR4800SAS Volu0001 ... (6 Replies)
Discussion started by: lochraven
6 Replies

7. 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

8. Shell Programming and Scripting

Help in parsing XML output file in perl.

Hi I have an XML output like : <?xml version="1.0" encoding="ISO-8859-1" ?> - <envelope> - <body> - <outputGetUsageSummary> - <usgSumm rerateDone="5"> - <usageAccum accumId="269" accumCaptn="VD_DP_AR" inclUnits="9999999.00" inclUnitsUsed="0.00" shared="false" pooled="false"... (7 Replies)
Discussion started by: rkrish
7 Replies

9. Shell Programming and Scripting

Help: Parsing a file to new output files

I have an output file similar to this >HWI-ST766:129:D0WJDACXX:4:2308:16645:199681.1 /start=1 /end=100 /strand=+ Eukaryotic18S_rRNA GATTAAGCCATGCATGTGTAAGTTTAAAGTCCTAGAAGGATGAAACTGCGGACGGCTCAT TATAACAGTAATAGTTTCTTTGGTTAGTATCTATAAGGAT >HWI-ST766:129:D0WJDACXX:4:2308:2922:199946.1 /start=1... (4 Replies)
Discussion started by: fozrun
4 Replies

10. UNIX for Dummies Questions & Answers

Help on parsing Oracle RMAN output for string and print sections of a file

Hi, I need some advise on how to print 'sections' of the attached file. I am searching for some that says Marked Corrupt and print some lines after it. At the moment I am running the command below: sed -n -e '/Marked Corrupt/{N;N;p;}' rman_list_validate.txtThis gives me the following... (1 Reply)
Discussion started by: newbie_01
1 Replies
XSetLineAttributes(3)						  XLIB FUNCTIONS					     XSetLineAttributes(3)

NAME
XSetLineAttributes, XSetDashes - GC convenience routines SYNTAX
int XSetLineAttributes(Display *display, GC gc, unsigned int line_width, int line_style, int cap_style, int join_style); int XSetDashes(Display *display, GC gc, int dash_offset, char dash_list[], int n); ARGUMENTS
cap_style Specifies the line-style and cap-style you want to set for the specified GC. You can pass CapNotLast, CapButt, CapRound, or Cap- Projecting. dash_list Specifies the dash-list for the dashed line-style you want to set for the specified GC. dash_offset Specifies the phase of the pattern for the dashed line-style you want to set for the specified GC. display Specifies the connection to the X server. gc Specifies the GC. join_style Specifies the line join-style you want to set for the specified GC. You can pass JoinMiter, JoinRound, or JoinBevel. line_style Specifies the line-style you want to set for the specified GC. You can pass LineSolid, LineOnOffDash, or LineDoubleDash. line_width Specifies the line-width you want to set for the specified GC. n Specifies the number of elements in dash_list. DESCRIPTION
The XSetLineAttributes function sets the line drawing components in the specified GC. XSetLineAttributes can generate BadAlloc, BadGC, and BadValue errors. The XSetDashes function sets the dash-offset and dash-list attributes for dashed line styles in the specified GC. There must be at least one element in the specified dash_list, or a BadValue error results. The initial and alternating elements (second, fourth, and so on) of the dash_list are the even dashes, and the others are the odd dashes. Each element specifies a dash length in pixels. All of the elements must be nonzero, or a BadValue error results. Specifying an odd-length list is equivalent to specifying the same list concatenated with itself to produce an even-length list. The dash-offset defines the phase of the pattern, specifying how many pixels into the dash-list the pattern should actually begin in any single graphics request. Dashing is continuous through path elements combined with a join-style but is reset to the dash-offset between each sequence of joined lines. The unit of measure for dashes is the same for the ordinary coordinate system. Ideally, a dash length is measured along the slope of the line, but implementations are only required to match this ideal for horizontal and vertical lines. Failing the ideal semantics, it is sug- gested that the length be measured along the major axis of the line. The major axis is defined as the x axis for lines drawn at an angle of between -45 and +45 degrees or between 135 and 225 degrees from the x axis. For all other lines, the major axis is the y axis. XSetDashes can generate BadAlloc, BadGC, and BadValue errors. DIAGNOSTICS
BadAlloc The server failed to allocate the requested resource or server memory. BadGC A value for a GContext argument does not name a defined GContext. BadValue Some numeric value falls outside the range of values accepted by the request. Unless a specific range is specified for an argu- ment, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this error. SEE ALSO
XCreateGC(3), XQueryBestSize(3), XSetArcMode(3), XSetClipOrigin(3), XSetFillStyle(3), XSetFont(3), XSetState(3), XSetTile(3) Xlib - C Language X Interface X Version 11 libX11 1.5.0 XSetLineAttributes(3)
All times are GMT -4. The time now is 03:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy