I need a script to automate my job. I have a gateway server, from where I can do sudo ssh to any server without asking password. I have a file - servers_list (contains linux+solaris servers) in this gateway server.
I need something like, if OS is Linux then run script_linux_1.3 and if OS is SunOS then run script_solaris_1.3.
I will need to run that script from gateway server only.
Below command can differentiate between OS as Linux or SunOS
Please suggest.
I need something like, if OS is Linux then run script_linux_1.3 and if OS is SunOS then run script_solaris_1.3.
I will need to run that script from gateway server only.
Below command can differentiate between OS as Linux or SunOS
HTML Code:
sudo ssh $i uname -a | awk '{print $1}'