[olug] --filter in rsync bash and python scripts ...
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
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:
Repository at tag "rsyncFilterWorking" -- look for rsync-so.sh:
' --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