Buying Need small shell script under linux

Discussion in 'Programming' started by deriklogov, Dec 4, 2009.

  1. #1
    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.
     
    deriklogov, Dec 4, 2009 IP
  2. rederth

    rederth Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    I can definitely do this. PM me if interested.
     
    rederth, Dec 4, 2009 IP
  3. sahabcse

    sahabcse Well-Known Member

    Messages:
    272
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    140
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    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
     
    sahabcse, Dec 6, 2009 IP