Hi all ,
I want to copy a file onto multiple linux and solaris machines. It should take the list of host m/c from a file which have the same root password.
I am totally new to scripting any help will be welcome.
create your listof_remote_machines.file
from /etc/hosts however you like.
(List will look like 145.300.4.34 rem_machine1 )
then do :
FILE_TOCOPY=your_file
REMDIR=dir_name_on_remote_machine
while read A B
do
rcp $FILE_TOCOPY ${B}:${REMDIR}
done < list_of_remote_machines.file
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.