Signed-off-by: Alejandro Colomar <alx@kernel.org>
i='';
k='no';
l='';
+m='';
n='';
r='no';
t='no';
}
-while getopts "A:B:C:chiklnrt:x:" opt; do
+while getopts "A:B:C:chiklm:nrt:x:" opt; do
case "$opt" in
A) A="-A$OPTARG"; ;;&
B) B="-B$OPTARG"; ;;&
i) i='-i'; ;;&
k | l) k='yes'; ;;&
l) l='-l'; ;;&
+ m) m="-m$OPTARG"; ;;&
n) n='-n'; ;;&
r) r='yes'; ;;&
t)
# shellcheck disable=SC2206 # We want only non-empty variables in the array.
-opts=($A $B $C $c $h $i $l -M $n);
+opts=($A $B $C $c $h $i $l -M $m $n);
if test -z "$*"; then
from which output would normally have been printed.
Each file is only printed once.
.TP
+.B \-m \~n
+Stop processing after finding
+.I n
+matches.
+.TP
.B \-n
Prefix each line of output with the
1-based line number within its input file.