Fix rabbitmqctl output filter

This commit is contained in:
Doctor 2022-07-11 13:23:43 +02:00
parent e3f08308ab
commit 79e63fc69d
1 changed files with 2 additions and 2 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 queues|^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 consumers| \
grep -v "^Listing" | grep -v "done.$" | \
grep -vE "^Timeout:|^Listing queues|^name" | grep -v "done.$" | \
perl -nle'($q, $s) = split; $q =~ s/[.=-]/_/g; print("$q.value $s")'