From: "Spalding, Steve" <SSPALDIN () mem-ins ! com>
To: tru64-unix-managers
Subject: Windowing grep output
Date: Mon, 16 Mar 1998 15:14:00 +0000 [thread overview]
Message-ID: <96078701111466.tru64-unix-managers.marc@archive.invalid> (raw)
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
reply other threads:[~1998-03-16 15:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox