首先进入到rabbitmq目录下的sbin目录
方法1:
./rabbitmqctl list_queues| grep helloQueue | awk '{print $1}' | xargs -n1 rabbitmqctl delete_queue
方法2:
./rabbitmqctl list_queues| grep helloQueue | awk '{a[$1]} END {for(i in a){rabbitmqctl delete_queue i;}}'
首先进入到rabbitmq目录下的sbin目录
方法1:
./rabbitmqctl list_queues| grep helloQueue | awk '{print $1}' | xargs -n1 rabbitmqctl delete_queue
方法2:
./rabbitmqctl list_queues| grep helloQueue | awk '{a[$1]} END {for(i in a){rabbitmqctl delete_queue i;}}'