cancel
Showing results for 
Search instead for 
Did you mean: 
Create a Post
Highlighted
Employee
Employee

Central Script to run command on multiple gateways

Hi Everyone 

This script can be very useful for enterprise customer where administrator has to perform some common gateway changes on multiple gateways . Like configuring NTP , syslog ,SNMP ,This can also be used to copy a file on multiple gateway in one go . or might be admin needs to know out of 1000 gateways which all gateway is running on  which version .

*********below is the script *************
[Expert@Management:0]# cat rcommand.sh
#!/bin/bash
echo "Do you want to run bash or clish command"
read shell
echo "please input the $shell command to run on all the gateway"
read input
for dest in $(<gateway_ip_list.txt); do
echo "running the $shell command $input on $dest "
cprid_util -server $dest -verbose rexec -rcmd /bin/$shell -c "$input"
done
[Expert@Management:0]#

*************************************************************

For step by step procedure refer the attached document .

Watch a demo here

(view in My Videos)

1 Reply
Employee+
Employee+

Re: Central Script to run command on multiple gateways

0 Kudos