Package: grep Version: 2.25-6 Severity: normal
Given after-context=3 it is expected to output at least 4 lines as documented, but adding max-count=1 makes it stop on the next matching line. What I do: $ printf '%s\n' a b a c | grep -m1 -A3 a What I see: a b What I expect: a b a c -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages grep depends on: ii dpkg 1.18.9 ii install-info 6.1.0.dfsg.1-8 ii libc6 2.23-1 ii libpcre3 2:8.38-3.1 grep recommends no packages. Versions of packages grep suggests: ii libpcre3 2:8.38-3.1 -- no debconf information