Skip to content
Advertisement

script for deleting queues using a certain prefix

i have a file named “Output_File.txt” containing a list of local queues and i want to write a script to delete those queues. what i wrote is:

JavaScript

the problem is that the script does delete the queues but prints for every deleted queue the following output:

JavaScript

how can i alter the code to delete the queues without printing the output above? thanks.

Advertisement

Answer

just use echo "delete qlocal( $currentqueue )" | runmqsc > /dev/null inside your for loop to direct all output of that command to blackhole /dev/null

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement