Looking for someone to create small shell script which should do : copy all files from specific folder to list of folders. basically I got script which were copied to approx . 60 folders, to update that script I need to copy all changes to those 60 folders, to make it more easy I think I could upload that script to one folder and then shell script could copy it over all folders specified lets say in some file. folder locations: copy from /home/terryfox/temp to /home/terryfox/country1 /home/terryfox/country2 and so on. those locations of folders should be somewhere else for easy update.
Hi Try below script #!/bin/bash # Shell script to copy all files specific folder to list of folders #Script written by sahabcse read -p "Enter the name of directory to upload the files [.] : " remotedir [ "$remotedir" == "" ] && remotedir="/home/terryfox/" || : cp -rp /home/terryfox/temp/* $remotedir ------------------- Save the script and change the permission chmod +x filename ./filename