[olug] --filter in rsync bash and python scripts ...

Rob Townley rob.townley at gmail.com
Fri May 24 20:46:27 UTC 2013


Thanks to Jay and Kevin for helping with my bash scripting problem.  Using
the alternate underline notation and moving the left doublequote character
to the right of the underline works best.   i did have it work once or
twice without the underline, but not repeatably.

Since we are an open source group, we oughta share more code so i
resurrected the olug project on sourceforge which started with a mirror of
my scratchpad repository on bitbucket.   If you have an account on either
site, send me your username and i will add you as  a developer or maybe an
admin.  Many of the olug member already have commit privileges.  Or we do
pull requests.

ServerFault.com may swallow source code characters so repositories are
better.  Better for source.  Better for config files.  Better for
replicating machine configurations.

Both of these repositories use git, but if you are brand new to version
control, mercurial has better defaults especially if you are really just
maintaining your own stuff.


My question on ServerFault:
http://serverfault.com/questions/505802/rsync-not-removing-single-quotes-around-array-of-strings-filter-list

Repository at tag "rsyncFilterWorking" -- look for rsync-so.sh:
https://sourceforge.net/p/olug/code/ci/rsyncFilterWorking/tree/<https://sourceforge.net/p/olug/code/ci/master/tree/>

https://bitbucket.org/rjt69/scratchpad/commits/tag/rsyncFilterWorking


i
' --filter=-_"dir with space/"     --filter=-_"dir2 s/" ' FAILS because
line encapsulating single quotes
' --filter="-_Default User/" '      ' --filter="-_Application Data/" '
FAILS Unknown filter rule: `"-_Application Data/"'
'--filter=-_"dir works space/"'  '--filter=-_"dir 3 s/"' works
 --filter=-_"dir works space/"     --filter=-_"dir 3 s/"  works
'--filter=-_Default User/'        '--filter=-_Application Data/' works



More information about the OLUG mailing list