Faheem Mitha
2003-Jan-21 20:23 UTC
is there a way to make rsync include/exclude options case insensitive?
Dear People, A friend asks ************************************************************* For the rsync include/exclude options is there a way to make it case insensitive? What I mean is that --exclude "*.pdf" would exclude "*.PdF" and "*.pdF" as well. I am looking for something like the -i switch for grep. ************************************************************* I did a check on Google Groups, and found a thread called "RegExpr in ---exclude" back in June 2002, but it seemed inconclusive. It looked like there was not "native" way to do this in rsync, and one had to rely on shell trickery, which I am always distrustful of. It looked (at the time at least) like rsync did not support regular expressions. Can anyone offer any other ideas or suggestions? Please cc me if possible with any reply. I'm not subscribed. However, I can check the list archives later if necessary. Thanks in advance. Faheem.
Wayne Davison
2003-Jan-21 20:30 UTC
is there a way to make rsync include/exclude options case insensitive?
On Tue, Jan 21, 2003 at 08:12:31PM +0000, Faheem Mitha wrote:> What I mean is that --exclude > "*.pdf" would exclude "*.PdF" and "*.pdF" as well.You currently have to do this: *.[Pp][Dd][Ff] The fnmatch() function that rsync currently uses for its pattern matching only has a case-folding option if it is the GNU version, and there's no way to ask rsync to set this flag at the moment. ..wayne..