Sponsored Content
Top Forums Shell Programming and Scripting Rsync to an external list of URLs Post 302241575 by ibsen on Monday 29th of September 2008 06:44:09 PM
Old 09-29-2008
OK, so I'm able to loop through the external file and read a line into a variable. (I'm working with Mac OS X.)

Code:
SRCURL="~/Desktop/listrsync/source/";
while read URL
do
	echo "$URL";
	echo "rsync -avz --dry-run $SRCURL $URL";
	rsync -avz --dry-run $SRCURL $URL;
done < ~/Desktop/listrsync/targets.txt

Within the targets.txt file, I have:

Code:
~/Desktop/listrsync/a/
~/Desktop/listrsync/b/
~/Desktop/listrsync/c/

When I run the script, it produces the output:

Code:
~/Desktop/listrsync/source/
~/Desktop/listrsync/a/
rsync -avz --dry-run ~/Desktop/listrsync/source/ ~/Desktop/listrsync/a/
~/Desktop/listrsync/b/
rsync -avz --dry-run ~/Desktop/listrsync/source/ ~/Desktop/listrsync/b/
~/Desktop/listrsync/c/
rsync -avz --dry-run ~/Desktop/listrsync/source/ ~/Desktop/listrsync/c/

As you'd said, the rsync command itself doesn't work when run from within the loop. I'm wondering, since I can get validly-formatted rsync commands from the output, is there a way to simply run them?

Maybe through piping?

Or a temp file?
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
gnome-desktop-item-edit(1)					   User Commands					gnome-desktop-item-edit(1)

NAME
gnome-desktop-item-edit - GNOME Desktop file editor SYNOPSIS
gnome-desktop-item-edit [--create-new] filename DESCRIPTION
gnome-desktop-item-edit is the GNOME Desktop file editor, which you can use to create or edit the .desktop (known as desktop) file. GNOME uses a standard desktop file specification as proposed by freedesktop.org. A desktop file consists of a number of name-value pairs that define how a desktop should organize a particular application. As this is defined as an open standard, integration of applications into GNOME Desktop is relatively straightforward. A basic entry in the desktop file must start with a tag called [Desktop Entry]. It can then have a number of name-value pairs as defined by the standard. The minimum entries are as follows: Name the name of the application Comment a textual description of the application which is displayed as a tooltip message by gnome-panel. When set appropri- ately, the comment can be localized within the same file. Exec the name of the actual executable Icon the file name of the icon image Type the desktop file type Categories a multi-string field which is used by gnome-panel to group applications into the appropriate categories. These desktop files provide the information to gnome-panel, which places the application in the appropriate locations on the panel. In a similar manner, the GNOME file manager (Nautilus) uses information from the desktop files to display the 'applications:///' view. OPTIONS
The following options are supported: --create-new Creates a new .desktop file. OPERANDS
The following operands are supported: filename The name of the desktop file to be edited or viewed. EXAMPLES
Example 1: Editing an existing .desktop file example% gnome-desktop-item-edit fullpath/filename This command invokes the launcher dialog and loads the contents of the specified desktop file into the relevant fields. EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/gnome-desktop-item-edit Executable for GNOME Desktop file editor /usr/share/applications/ Location of system desktop files ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-panel | +-----------------------------+-----------------------------+ |Interface stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
gnome-panel(1), nautilus(1), attributes(5) Latest version of the GNOME Desktop User Guide for your platform. NOTES
Written by Ghee Teo, Sun Microsystems Inc., 2003. SunOS 5.11 2 Oct 2003 gnome-desktop-item-edit(1)
All times are GMT -4. The time now is 04:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy