Rsync to an external list of URLs


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Rsync to an external list of URLs
# 8  
Old 10-06-2008
Would this work? I'm trying to:

1. Read first line into a variable.
2. Loop from second line to EOF.
3. Write rsync command with variable as source and current line as target.
4. Pipe results of loop to sh to run as script.

Code:
url_list='~/pathto/file.txt'
current_source=$(awk 'NR==1'  "$url_list")
x=2
for (( $url_list-1 )) in $url_list
print "rsync -avz $(awk "NR==$x" "$url_list")" $current_source
$x++ | 
sh

# 9  
Old 10-06-2008
Quote:
Originally Posted by ibsen
As you'd said, the rsync command itself doesn't work when run from within the loop.
Should work in the loop, try to set the full path to rsync.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rsync Error: rsync: link_stat failed: No such file or directory (2)

I wish to copy all the files & folder under /web/Transfer_Files/data/ on mymac1 (Linux) to remote server mybank.intra.com (Solaris 10) /tmp/ location I am using Ansible tool synchronize module which triggers the unix rsync command as below:rsync --delay-updates -F --compress --archive --rsh=ssh... (2 Replies)
Discussion started by: mohtashims
2 Replies

2. Solaris

How can i list Solaris External storages?

Hi how can i list Solaris external storage's only, ie SAN, # for fs in `mount -p | egrep 'ufs|zfs|vxfs' | awk '{print $3}'`; do df -h $fs | sed 's/%//g' | grep -v capacity; done /dev/dsk/c2t5000C5003C31721Bd0s0 30G 18G 12G 61 /... (5 Replies)
Discussion started by: bentech4u
5 Replies

3. OS X (Apple)

Rsync for back up, external HD

Hello all! I am quite unsure with all options of rsync. Here my backup configuration: I am on Mac X (10.8) and want an exact copy of my HD to an external HD. I formatted the new USB drive with Mac OS extended (Journaled, Encrypted) and made in my shell the following command and got the... (9 Replies)
Discussion started by: marek
9 Replies

4. Shell Programming and Scripting

Trying to extract domain and tld from list of urls.

I have done a fair amount of searching the threads, but I have not been able to cobble together a solution to my challenge. What I am trying to do is to line edit a file that will leave behind only the domain and tld of a long list of urls. The list looks something like this: www.google.com... (3 Replies)
Discussion started by: chamb1
3 Replies

5. UNIX for Dummies Questions & Answers

rsync file list help

Is it possible to make rsync output a list of all the files transferred to a separate text file? If so how? I wondered if the --write-batch=FILE optionis what I need Thanks (1 Reply)
Discussion started by: barrydocks
1 Replies

6. Shell Programming and Scripting

Remove external urls from .html file

Hi everyone. I have an html file with lines like so: link href="localFolder/..."> link href="htp://..."> img src="localFolder/..."> img src="htp://..."> I want to remove the links with http in the href and imgs with http in its src. I'm having trouble removing them because there... (4 Replies)
Discussion started by: CowCow339
4 Replies

7. Web Development

Tricky mod_rewrite for clean urls problems when fetching external sources

Hi, I have problems with mod rewrite. I will try to describe... I want clean urls but fail to make it work propperly. Maybe I have problems, because the content displayed is fetched from my other site... There is a lot of stuff I already red about this, but somehow I can not find a solution... (2 Replies)
Discussion started by: lowmaster
2 Replies

8. UNIX for Advanced & Expert Users

Rsync building file list/catalog path/location

Where is the file list created by rsync when it says building file list ? (1 Reply)
Discussion started by: glev2005
1 Replies

9. Shell Programming and Scripting

finding and removing patterns in a large list of urls

I have a list of urls for example: Google Google Base Yahoo! Yahoo! Yahoo! Video - It's On Google The problem is that Google and Google are duplicates as are Yahoo! and Yahoo!. I'm needing to find these conical www duplicates and append the text "DUP#" in from of both Google and... (3 Replies)
Discussion started by: totus
3 Replies

10. UNIX for Dummies Questions & Answers

Rsync file list

Hello, I'm trying to utilize rsync to backup 7 gigs of approximately 10,000 files, from what I've read this should be no sweat. However subsequent syncs seem to build an entirely new file list and the process takes a great deal of time. Reading the man page I'm not sure if I need to specify a file... (3 Replies)
Discussion started by: hexaplus
3 Replies
Login or Register to Ask a Question