Created
May 18, 2015 19:43
-
-
Save pepoviola/28be1dc2205d0f37dd2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get data from file m.map | |
# this file has the map sourceName, destName | |
#i.e: | |
#/source/A.jpg,/dest/B.jpg | |
# split with awk and create an array, the use the array to scp | |
for i in $(cat m.map); do A=($(echo ${i}|awk -F"," '{print $1" "$2}'));scp ${A[0]} 1.1.1.1:${A[1]};done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment