My manager required that i keep the hostnames and username and password in a separate file when creating my sftp script.
(Don't mention passwords and sftp...I've talk to him about this several times)
I have a list of hostnames that have to be read in a loop in my main script.
I don't know how to list these in the other file which contains ALOT of other variables, so that they will be picked up and read in a loop.
I have four hostnames. All four are going to be used in this loop its pulling files from one server, then the next, then the next, and so on till it complete.
This file he wants the names in...contains about hundred variables used by many scripts. I
I dont know much about doing this, its my first time. I need to be spoke to like the idiot I am. How do I make sure these hostnames are read properly when I source them.
I know how to source the file, I know how to say pass=${PASSWORD_COMING_FROM_OTHER_sh} or whatever. But I dont know how to list them in this file so that they are read correctly.
Like I know I have to add an EXPORT HOSTS SECTION to it, then export the hosts to a variable array and then use that array in your script