help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing list of filename suffixes to script.


From: Greg Wooledge
Subject: Re: Passing list of filename suffixes to script.
Date: Sat, 24 Jul 2021 14:16:58 -0400

On Sat, Jul 24, 2021 at 07:43:44PM +0200, dora-solomon@brusseler.com wrote:
> > "I have a known list of suffixes that I want to pass to rsync, and I
> > have been using the bash brace expansion syntax to do it, but it
> > doesn't work when my suffixes contain literal commas."
> 
> That's it.  I babbled too much.

OK.

> Perhaps the following and could also rewove the braces.
> -e{",v",.othersuffix}

No.  Simply stop using the brace expansion syntax.

Brace expansion's *entire* purpose is to save you effort, by reducing
the amount of duplication you have to type.  It doesn't do anything
else.

It seems you've become confused, and are operating under the impression
that the brace expansion syntax is somehow *required*, or is being
interpreted by rsync.  It's not.  It's simply one of bash's features
for reducing typing.

The moment you spend more than 30 seconds trying to figure out how to
work around its limitations, you've already lost.  You could have spent
those 30 seconds typing out the command normally instead.

rsync -i.c -i.h -e,v -e.othersuffix

There, that's it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]