From: Jeremy Harris Date: Fri, 10 May 2019 12:02:28 +0000 (+0100) Subject: Utilities: add -G option to exiqgrep. Bug 2397 X-Git-Tag: exim-4.93-RC0~193 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=27607d0311c4b32440c6a3396e4a022640dd930e;p=user%2Fhenk%2Fcode%2Fexim.git Utilities: add -G option to exiqgrep. Bug 2397 --- diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index dea7bc761..e2f1eafe1 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -37720,6 +37720,11 @@ Match only frozen messages. .vitem &*-x*& Match only non-frozen messages. + +.new +.vitem &*-G*&&~<&'queuename'&> +Match only messages in the given queue. Without this, the default queue is searched. +.wen .endlist The following options control the format of the output: diff --git a/src/src/exiqgrep.src b/src/src/exiqgrep.src index c4f7c4b58..c8762df47 100644 --- a/src/src/exiqgrep.src +++ b/src/src/exiqgrep.src @@ -53,11 +53,12 @@ if ($ARGV[0] eq '--version') { exit 0; } -getopts('hf:r:y:o:s:C:zxlibRca',\%opt); +getopts('hf:r:y:o:s:C:zxlibRcaG:',\%opt); if ($ARGV[0]) { &help; exit;} if ($opt{h}) { &help; exit;} if ($opt{a}) { $eargs = '-bp'; } if ($opt{C} && -e $opt{C} && -f $opt{C} && -R $opt{C}) { $eargs .= ' -C '.$opt{C}; } +if ($opt{G}) { $eargs .= ' -qG'.$opt{G}; } # Read message queue output into hash &collect(); @@ -83,6 +84,7 @@ Selection criteria: -o Message older than -z Frozen messages only (exclude non-frozen) -x Non-frozen messages only (exclude frozen) + -G Match in given queue only [ NB: for regexps, provided string sits in // ]