Rsync with a list of variables

Posted by EMKA on Super User See other posts from Super User or by EMKA
Published on 2011-11-21T02:30:54Z Indexed on 2011/11/22 1:56 UTC
Read the original article Hit count: 158

Filed under:
|

I am trying to write a bash script that will rsync only a specific subset of folders. I am trying to figure out a more slick so that I can just add a variables such as FOLDER1='name of folder in home directory' and then

rsync -arvz --delete /home/emka/$FOLDER1/ /home/emka/Desktop/Mount/$FOLDER1

Currently I have FOLDER1 through FOLDER13, but I do not want to have the above line thirteen times.

Could someone give me a push on how to do this?

© Super User or respective owner

Related posts about bash

Related posts about rsync