Is there a way to run a if command in a script that can match multiple values for example I would push a script to a bunch of servers and each server would only run the command if the servers host name is one of the entered values in the command or list.
I tried something like this but it obviously didn't work..
#!/bin/bash
if [ $HOSTNAME = server1.domain.com, server2.domain.com, server3.domain.com, server4.domain.com ]
then
/home/user/update_1
else
/home/user/update_2
fi
It would be even better if I could just have it check against a file with a list of servers