I have two variables, that I need to concatenate together to form a server name with its fqdn. Because of permission problems, I can only access certain files to get information. Maybe below isn't the best way to get the variables in ruby but they work. If there is a more efficient way, I'm all ears. Anyway, below are the variables. Since I can't get the server/fqdn from one spot I had to pull from two different resources, a file and from the hostname command. I need to get them to be server.fqdn.com:
$server=`grep server /etc/config_file | awk '{print $2}'`
$domain=`hostname -d`
Again, I'm trying to get them together to make server.fqdn.com
Thanks!!
{}button to properly format code snippets.