From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078701111466.tru64-unix-managers.marc@archive.invalid> From: "Spalding, Steve" Date: Mon, 16 Mar 1998 15:14:00 +0000 To: tru64-unix-managers Subject: Windowing grep output X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078701111466 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