Invoking rsync from a script with null parameters

Voelker, Bernhard bernhard.voelker at siemens-enterprise.com
Mon Nov 5 01:22:56 MST 2012


Joe wrote (Monday, November 05, 2012 4:23 AM):

> To avoid having a number of slightly different rsync commands, I would
> like to use shell variables as part of the rsync command.  I.e.:
> DRYRUN="-n"
> rsync "${DRYRUN}" more parameters ...

Just omit the quotes (and in this case you can
also omit the curly braces):

 $ rsync $DRYRUN more parameters ...

Have a nice day,
Berny


More information about the rsync mailing list