Looking to enhance my script further now. Now that I know I can read in a variable from a file to my script, I'd like to have in that file a list of hostnames and beside each hostname the IP address. Then in my script I'll need an if statement or case statement to check for the hostname of the server and use the IP address from the file. Looking at the Bash reference manual I see there is a global variable for hostname called HOSTNAME.

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum