Project

General

Profile

Feature #4701

would like grep context options (-A, -B, -C)

Added by David Pacheco over 5 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2014-03-24
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

GNU grep supports -A N/-B N to show N lines of context before/after each match, and -C N to show context around a match. It would be nice if we supported these as well.

History

#1

Updated by Sachidananda Urs over 5 years ago

As far as I know these options are part of POSIX standard.
However, most of the Unices implement the -A, -B, and -C options. It would be a good idea to implement them.

#2

Updated by Gordon Ross almost 4 years ago

Out for review here: (since July 2014)
http://ma.nexenta.com/~mbarden/4701/

#3

Updated by Electric Monk about 2 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 9992e6a682b1c35b4385c3b512db329ec8ab9ede

commit  9992e6a682b1c35b4385c3b512db329ec8ab9ede
Author: Matthew Barden <matt.barden@nexenta.com>
Date:   2017-11-10T18:48:44.000Z

    4701 would like grep context options (-A, -B, -C)
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Gary Mills <gary_mills@fastmail.fm>
    Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Also available in: Atom PDF