I was just confused because you said you wanted 10 lines of context before the SEVERE line, but your sample output provided 8 lines instead of 10.
The following awk script seems to do what you requested (with 10 lines of context):
If you want to run this on a Solaris/SunOS system, use /usr/xpg4/bin/awk, /usr/xpg6/bin/awk, or nawk instead of awk.
This User Gave Thanks to Don Cragun For This Post:
Hi there, if i had a file that looked like this
my_server1
red
green
blue
yellow
blue
my_server2
blue
blue
yellow
green
blue
my_server3
yellow (9 Replies)
I want to find the unique url in a apache logs which got 404 error .
I can do something like
"cat apache.log|grep 404|awk '{print $2,$3}'|grep 404
this will give me say
/foo.html 404
/foo.html 404
/foo.html 404
/bar.html 404
/cat.html 404
However my output should only find... (3 Replies)
I'm having trouble with extracting certain lines from a file based on whether they have all the required fields.
Original file:
snt:594:Sam N This
bpt:2342:Bob P That
lr:123
wrp:23:Whoever Person
cor:794
Desired output:
snt:594:Sam N This
bpt:2342:Bob P That
wrp:23:Whoever Person
... (3 Replies)
Hi,
I have one file, say file 1, that has data like below where 19900107 is the date,
19900107 12 144 129 0.7380047
19900108 12 168 129 0.3149017
19900109 12 192 129 3.2766666E-02
... (3 Replies)
i have a log file that has the date and time that looks like this:
Wed Jun 28 15:46:21 2012 test failed tailed passed passed not error panic
what we want to focus on is the first 5 columns because they contain the date and time.
the date and time can be anywhere on the line. in this... (6 Replies)
Hi Guys,
I want to write a script which can grep the logs (server.log) from a file for Error String and output to a other file.
Problems:
How to know about the errors only between the current restart and not in previous as server.log has earlier restarts also?
thanks for the help! Much... (5 Replies)
Hello
I have a file with nearly 90000 lines in x,y,z format but have some lines that I do not need to show. Is there anyway to delete those 3 lines after every 288 lines.
Eg I keep the first 288 lines delete (289, 290 291); keep the next 288 lines after those and so on...
Thanks (6 Replies)
cat file1
*FileHeader* Partition 0
Total Data Bytes 1416
Avg Bytes/Record 1416
Others 1
PRDX22.AUDIT_DATA_INFO Partition 4
Total Data Bytes 4615
Avg... (8 Replies)
Discussion started by: Veera_V
8 Replies
LEARN ABOUT X11R4
xpselectinput
XpSelectInput(3Xp) XPRINT FUNCTIONS XpSelectInput(3Xp)NAME
XpSelectInput - Specifies which X Print events, from the specified print context, the client is interested in.
SYNOPSIS
void XpSelectInput ( display, context, event_mask )
Display *display;
XPContext context;
unsigned long event_mask;
ARGUMENTS
display
Specifies a pointer to the Display structure; returned from XOpenDisplay.
context
Specifies the print context from which to select events.
event_mask
Specifies the event mask. This mask is the bitwise OR one or more of the valid events mask bits (see below).
DESCRIPTION
XpSelectInput selects which X Print events from the specified print context the client is interest in. The X Print Events are generated
from a current print context, and not from a window as is the case with XSelectInput.
STRUCTURES
The bits for event_mask are defined in <X11/extensions/Print.h>:
#define XPNoEventMask 0
#define XPPrintMask (1L<<0)
#define XPAttributeMask (1L<<1)
The resulting events are defined in <X11/extensions/Print.h>:
#define XPPrintNotify 0
#define XPAttributeNotify 1
DIAGNOSTICS
BadValue The value specified for event_mask is not valid.
XPBadContext The specified print context is not valid.
FILES
<X11/extensions/Print.h>
X Version 11 libXp 1.0.0 XpSelectInput(3Xp)