I'm trying to write a script that allows connection to various servers, e.g.
#!/bin/bash
# list of servers
server1=10.10.10.10
server2=20.20.20.20
ssh ${$1}
And I'd like to run it like:
sh connect.sh server1
Can't figure out how to use the parameter's name as a variable. Arrays do not work on my Ubuntu too.