[exim-cvs] Utilities: add -G<queuename> option to exiqgrep. …

Inizio della pagina
Delete this message
Reply to this message
Autore: Exim Git Commits Mailing List
Data:  
To: exim-cvs
Oggetto: [exim-cvs] Utilities: add -G<queuename> option to exiqgrep. Bug 2397
Gitweb: https://git.exim.org/exim.git/commitdiff/27607d0311c4b32440c6a3396e4a022640dd930e
Commit:     27607d0311c4b32440c6a3396e4a022640dd930e
Parent:     e5903596a0f6b078f5854ca591963e21c7f7328a
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Fri May 10 13:02:28 2019 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sat May 11 13:21:46 2019 +0100


    Utilities: add -G<queuename> option to exiqgrep.  Bug 2397
---
 doc/doc-docbook/spec.xfpt | 5 +++++
 src/src/exiqgrep.src      | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)


diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index dea7bc7..e2f1eaf 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 c4f7c4b..c8762df 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 <seconds>    Message older than
     -z        Frozen messages only (exclude non-frozen)
     -x        Non-frozen messages only (exclude frozen)
+    -G <queuename>    Match in given queue only


[ NB: for regexps, provided string sits in /<string>/ ]