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)
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)
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)
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)
Hi friends,
I am looking for sed command/script that would search for a given fixed pattern on odd lines and then if it matches, prints the matching pattern and the next line. For example, in the example below, i am looking for pattern 0 and 1011 on odd lines.
########## start of example file... (10 Replies)
Hello,
i have a question.
My problem is that i have a file like:
TEST
JOHN
ADAM
MICHAEL
SEBASTIAN
ANDY
i want find for MICHAEL and want delete lines like this:
TEST (4 Replies)
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Guys i need an idea for one logic..in shell scripting am struggling with a logic...So the thing is... i need to search for a word in a huge log file and i need to continue to print few more lines from that line and the consecutive line has to end when it finds the line with date..because i know... (1 Reply)
Discussion started by: Prathi
1 Replies
LEARN ABOUT DEBIAN
event2vrule
EVENT2VRULE(1) General Commands Manual EVENT2VRULE(1)NAME
event2vrule - adds 'events' to rrdtool graphs
SYNOPSIS
event2vrule <params>
DESCRIPTION
Adding Events to Graphs
There is a new graphing feature which allows you to specify events that should be displayed in your graphs. These events are simply a list
of points in time at which something of interest occurred.
For instance, one could create a plain text file in the graphs directory called events.txt containing these lines:
2001/02/10 1538 added support for events to FlowScan graphs
2001/02/12 1601 allowed the events file to be named on make command line
Then to generate the graphs with those events included one might run:
$ make -f graphs.mf events=events.txt
This feature was implemented using a new script called event2vrule that is supplied with FlowScan. This script is meant to be used as a
``wrapper'' for running rrdtool(1), similarly to how one might run nohup(1). E.g.:
$ event2vrule -h 48 events.txt rrdtool graph -s -48h ...
That command will cause these VRULE arguments to be passed to rrdtool, at the end of the argument list:
COMMENT:
VRULE:981841080#ff0000:2001/02/10 1538 added support for events to FlowScan graphs
COMMENT:
VRULE:982015260#ff0000:2001/02/12 1601 allowed the events file to be named on make command line
COMMENT:
SEE ALSO add_ds.pl(1), add_txrx(1), flowscan(1), ip2hostname(1), locker(1)AUTHOR
This manual page was written by Anibal Monsalve Salazar, for the Debian Project.
EVENT2VRULE(1)