* Windowing grep output
@ 1998-03-16 15:14 Spalding, Steve
0 siblings, 0 replies; only message in thread
From: Spalding, Steve @ 1998-03-16 15:14 UTC (permalink / raw)
To: tru64-unix-managers
Hi all!
I've got an easy one for you this morning. I am wondering, how do you
window the output of a grep command to include the line before and/or
line after the matched string? I say "window" the output because that is
the name of the switch that you use in VMS along with the search command.
For example, if you had a file that looked like this:
Digital UNIX V4.0B (Rev. 564); Sun Feb 8 18:46:00 CST 1998
**************************************************************************
**
Missouri Employers Mutual Insurance
Creating a Healthy and Accident-Free Workplace.
**************************************************************************
**
Mon Mar 16 09:12:01 CST 1998
and you did a search for "employers" but you wanted to see the line
before and after the line that contained "employers" so that the output
would look like this:
**************************************************************************
**
Missouri Employers Mutual Insurance
Creating a Healthy and Accident-Free Workplace.
what command would you type in?
Thanks!
Stephen Spalding
sspaldin@mem-ins.com
Missouri Employers Mutual Insurance
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-03-16 15:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-03-16 15:14 Windowing grep output Spalding, Steve
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox