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: Alex fxmbsw7 Ratchev
Subject: Re: Passing list of filename suffixes to script.
Date: Sat, 24 Jul 2021 19:45:17 +0200

well at minimum ill try a filename printing of include with exclude

On Sat, Jul 24, 2021 at 7:44 PM <dora-solomon@brusseler.com> wrote:
>
> From: Greg Wooledge <greg@wooledge.org>
> To: help-bash@gnu.org
> Subject: Re: Passing list of filename suffixes to script.
> Date: 24/07/2021 19:23:41 Europe/Paris
>
> On Sat, Jul 24, 2021 at 07:11:58PM +0200, dora-solomon@brusseler.com 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?
>
>
>
> I am trying to decide on a good system to pass filename suffixes.  Allow to 
> pass anything
>
> rather than restrict things to some suffix types only.
>
>
>
> Perhaps the following and could also rewove the braces.
>
>
>
> -e{",v",.othersuffix}
>
>
>
> Wanted to check with you on what ideas to trash and a good way to do it.
>
>
>
> > 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."
>
>
>
> That's it.  I babbled too much.
>
>
>
> > 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]