06-22-2012
dude
you are printing both the pattern (on the odd line) and the next line (even line). That is why you will get the 2nd zero as a result of pattern match on the previous odd line.
Does that sound good?
Please ask more questions if you feel.
Thanks a lot for your effort.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to search a file for a string and then if the string is found I need the line that the string is on - but also the previous two lines from the file (that the pattern will not be found in)
This is on solaris
Can you help? (2 Replies)
Discussion started by: frustrated1
2 Replies
2. UNIX for Dummies Questions & Answers
hi,
I have a file say x.txt containing
xxx
123
bla
bla
...
you
xxx
dfk
dbf
...
me
xxx
...
...
keeps on..
i need to search for pattern in the line starting xxx in the file. If pattern matched, I need to fetch all the lines till i find next xxx. (17 Replies)
Discussion started by: prsshini
17 Replies
3. Shell Programming and Scripting
Hi,
I have to search those statements from the file which starts from "shanky"(only shanky, shanky09 or 09shanky is not allowed) and ends with ");". These two string can be in a same line or different line. And also i have to negate those lines which starts with #.
Can any one please give me... (2 Replies)
Discussion started by: shanky09
2 Replies
4. Shell Programming and Scripting
Gurus,
I have a big file that needs to be sorted out and I cant figure out what to do. The file name is as below:
Name: xxxx yyyy nnnn
Description: dfffgs sdgsgsf hsfhhs
afgghhjdgj
fjklllll gsfhfh
Updated: jafgadsgg gsg
Corrected: date today
The file consists of line like these.
... (13 Replies)
Discussion started by: The One
13 Replies
5. Shell Programming and Scripting
I have a file split something like
01/11/2010:
No of users 100
02/11/2010:
No of users 102
03/11/2010:
No of users 99
...
I want to search the file for a particular date and then extract the following line with the date, something like
02/11/2010 No of users 102
I can grep... (6 Replies)
Discussion started by: gefa
6 Replies
6. Shell Programming and Scripting
i need to search for a pattern from a big file and print everything expect the next 6 lines from where the pattern match was made. (8 Replies)
Discussion started by: chidori
8 Replies
7. Shell Programming and Scripting
Hi,
I have a huge de-limited file which has pattern :
99"9876"2010-11-21 12:51:01"J"MNOPQRS ID# 2-1234-1234-0099-9876-0 "" <<read>>
99"9876"2010-11-21 12:51:01"K"R-EMP# 01234567 (LOGOFF) "" <<read>>
99"9876"2010-11-21 12:51:01"L" *AUTO LOGOFF* ... (3 Replies)
Discussion started by: angie1234
3 Replies
8. Shell Programming and Scripting
Hi,
I've written a script to search for an Oracle ORA- error on a log file, print that line and the .trc file associated with it as well as the dateline of when I assumed the error occured. In most it is the first dateline previous to the error.
Unfortunately, this is not a fool proof script.... (2 Replies)
Discussion started by: newbie_01
2 Replies
9. Shell Programming and Scripting
In the below directory I am trying to delete all lines with a .bam extention that have the pattern IonCode_ followed by an even number. I am also trying to delete all lines with a .fastq extention that have the pattern IonCode_ followed by an odd number. I was going to use find but can see all... (6 Replies)
Discussion started by: cmccabe
6 Replies
10. UNIX for Beginners Questions & Answers
In the awk piped to sed below I am trying to format file by removing the odd xxxx_digits and whitespace after, then move the even xxxx_digit to the line above it and add a space between them. There may be multiple lines in file but they are in the same format. The Filename_ID line is the last line... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT HPUX
xsetdashes
XSetDashes() XSetDashes()
Name
XSetDashes - set a pattern of line dashes in a graphics context.
Synopsis
XSetDashes(display, gc, dash_offset, dash_list, n)
Display *display;
GC gc;
int dash_offset;
char dash_list[];
int n;
Arguments
display Specifies a connection to an X server; returned from XOpenDisplay().
gc Specifies the graphics context.
dash_offset
Specifies the phase of the pattern for the dashed line style.
dash_list Specifies the dash list for the dashed line style. An odd-length list is equivalent to the same list concatenated with itself to
produce an even-length list.
n Specifies the length of the dash list argument.
Description
XSetDashes() sets the dashes component of a GC. The initial and alternating elements of the dash_list argument are the dashes, the others
are the gaps. All of the elements must be non-zero, with lengths measured in pixels. The dash_offset argument defines the phase of the
pattern, specifying how many pixels into the dash_list the pattern should actually begin in the line drawn by the request.
n specifies the length of dash_list. An odd value for n is interpreted as specifying the dash_list concatenated with itself to produce
twice as long a list.
Ideally, a dash length is measured along the slope of the line, but server implementors are only required to match this ideal for horizon-
tal and vertical lines. Failing the ideal semantics, it is suggested 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 315 and 225 degrees from the x
axis. For all other lines, the major axis is the y axis.
See Volume One, Chapter 5, The Graphics Context, for further information.
Errors
BadAlloc
BadGC
BadValue No values in dash_list.
Element in dash_list is 0.
See Also
XDefaultGC(), XChangeGC(), XCopyGC(), XCreateGC(), XFreeGC(), XGContextFromGC(), XSetArcMode(), XSetBackground(), XSetClipMask(), XSetCli-
pOrigin(), XSetClipRectangles(), XSetFillRule(), XSetFillStyle(), XSetForeground(), XSetFunction(), XSetGraphicsExposures(), XSetLineAt-
tributes(), XSetPlaneMask(), XSetState(), XSetStipple(), XSetSubwindowMode(), XSetTSOrigin().
Xlib - Graphics Context XSetDashes()