[Top][All Lists]

[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 13:23:41 -0400

On Sat, Jul 24, 2021 at 07:11:58PM +0200, wrote:
> call_rsync -i{.c,.f} -- more here for rsync
> There is the problem of how to pass ,v and other non-period suffixes. 

Oh, so the original problem specification was all wrong?  You're NOT
actually passing a list of suffixes to a script, and then trying to
generate a command dynamically from the positional parameters within
the script?

That would have been good to know.

It sounds like the new problem specification is:

"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."

Simply stop using the brace expansion syntax within your script.  Write
the arguments out explicitly instead.

call_rsync -i.c -i.f -i,v

reply via email to

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