Fix rabbitmqctl output filter

This commit is contained in:
Doctor 2022-07-11 13:49:52 +02:00
parent e3f08308ab
commit 94c7f9f01e
3 changed files with 6 additions and 6 deletions

View File

@ -31,7 +31,7 @@ fi
HOME=/tmp/
VHOST=${vhost:-"/"}
QUEUES=$(HOME=$HOME rabbitmqctl list_queues -p $VHOST name | \
grep -v '^Listing' | \
grep -vE '^Timeout:|^Listing|^name' | \
grep -v 'done\.$' | sed -e 's/[.=-]/_/g' )
if [ "$1" = "config" ]; then
@ -71,5 +71,5 @@ fi
# "value" subfield for every data field.
HOME=$HOME rabbitmqctl list_queues -p $VHOST | \
grep -v "^Listing" | grep -v "done.$" | \
grep -vE "^Timeout:|^Listing|^name" | grep -v "done.$" | \
perl -nle'($q, $s) = split; $q =~ s/[.=-]/_/g; print("$q.value $s")'

View File

@ -31,7 +31,7 @@ fi
HOME=/tmp/
VHOST=${vhost:-"/"}
QUEUES=$(HOME=$HOME rabbitmqctl list_queues -p $VHOST name | \
grep -v '^Listing' | \
grep -vE '^Timeout:|^Listing|^name' | \
grep -v 'done\.$' | sed -e 's/[.=-]/_/g' )
if [ "$1" = "config" ]; then
@ -71,5 +71,5 @@ fi
# "value" subfield for every data field.
HOME=$HOME rabbitmqctl list_queues -p $VHOST name messages_unacknowledged | \
grep -v "^Listing" | grep -v "done.$" | \
grep -vE "^Timeout:|^Listing|^name" | grep -v "done.$" | \
perl -nle'($q, $s) = split; $q =~ s/[.=-]/_/g; print("$q.value $s")'

View File

@ -31,7 +31,7 @@ fi
HOME=/tmp/
VHOST=${vhost:-"/"}
QUEUES=$(HOME=$HOME rabbitmqctl list_queues -p $VHOST name | \
grep -v '^Listing' | \
grep -vE '^Timeout:|^Listing|^name' | \
grep -v 'done\.$' | sed -e 's/[.=-]/_/g' )
if [ "$1" = "config" ]; then
@ -71,5 +71,5 @@ fi
# "value" subfield for every data field.
HOME=$HOME rabbitmqctl list_channels -p $VHOST name messages_uncommitted | \
grep -v "^Listing" | grep -v "done.$" | \
grep -vE "^Timeout:|^Listing|^name" | grep -v "done.$" | \
perl -nle'($q, $s) = split; $q =~ s/[.=-]/_/g; print("$q.value $s")'