Add support for the non-standard grep -m extension.
authorpirofti <pirofti@openbsd.org>
Sat, 9 Dec 2017 18:38:37 +0000 (18:38 +0000)
committerpirofti <pirofti@openbsd.org>
Sat, 9 Dec 2017 18:38:37 +0000 (18:38 +0000)
commitb5430e4d8844f8588034f4c5399e4dc5d6ca5cd9
tree5a11435dd1fae13b7b24b2235b74b9a807480e9c
parent568004a55bffca48ca8672baeb0f1704e0362b6e
Add support for the non-standard grep -m extension.

grep -m num stops after a maximum of num matches are found.
We support -m0 to match GNU behaviour, but we do not allow negative
numbers.

Manpage help from jmc@, OK deraadt@.
usr.bin/grep/grep.1
usr.bin/grep/grep.c
usr.bin/grep/grep.h
usr.bin/grep/util.c