[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:15:49 +0200 |
what is the goal
rsync --exclude list and --accept list together for few elements ?
On Sat, Jul 24, 2021 at 7:14 PM <dora-solomon@brusseler.com> wrote:
>
> There will be both include and exclude files.
>
>
> From: dora-solomon@brusseler.com
> To: Greg Wooledge <greg@wooledge.org>;
> help-bash@gnu.org
> Subject: Passing list of filename suffixes to script.
> Date: 24/07/2021 19:11:58 Europe/Paris
>
> 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:01:28 Europe/Paris
>
> On Sat, Jul 24, 2021 at 06:57:34PM +0200, dora-solomon@brusseler.com wrote:
> > Yes, it is for an rsync functionality. I would like to gather the suffixes
> > together as I
> >
> > will do some other checks in addition to rsync and some status logs.
>
> > Showing us an example of the rsync command you want to create would be
> > ideal.
>
> > In the absence of that, I'll just guess that you want to receive a list
> > of suffixes, such as:
>
> > .c
> > .h
> > ,v
>
> > And generate a command like this:
>
> > rsync --accept="*.c" --accept="*.h" --accept="*,v"
>
>
>
>
>
> Yes, you are quite right. Or
>
>
>
> call_rsync -i{.c,.f} -- more here for rsync
>
> There is the problem of how to pass ,v and other non-period suffixes.
>
>
> > Here's how I would do it:
>
>
> #!/bin/bash
>
> args=()
> for arg; do
> args+=(--accept="*$arg")
> done
>
> args+=( other rsync arguments here )
>
> rsync "${args[@]}"
>
>
>
>
- Passing list of filename suffixes to script., (continued)
- Passing list of filename suffixes to script., dora-solomon, 2021/07/24
- Re: Passing list of filename suffixes to script., Greg Wooledge, 2021/07/24
- Re: Passing list of filename suffixes to script., Alex fxmbsw7 Ratchev, 2021/07/24
- Re: Passing list of filename suffixes to script., Greg Wooledge, 2021/07/24
- Re: Passing list of filename suffixes to script., Alex fxmbsw7 Ratchev, 2021/07/24
- Passing list of filename suffixes to script., dora-solomon, 2021/07/24
- Re: Passing list of filename suffixes to script., Alex fxmbsw7 Ratchev, 2021/07/24
- Passing list of filename suffixes to script., dora-solomon, 2021/07/24
- Passing list of filename suffixes to script., dora-solomon, 2021/07/24
- Passing list of filename suffixes to script., dora-solomon, 2021/07/24
- Re: Passing list of filename suffixes to script.,
Alex fxmbsw7 Ratchev <=
- Passing list of filename suffixes to script., dora-solomon, 2021/07/24
- Re: Passing list of filename suffixes to script., Alex fxmbsw7 Ratchev, 2021/07/24
- Passing list of filename suffixes to script., dora-solomon, 2021/07/24
- Re: Passing list of filename suffixes to script., Alex fxmbsw7 Ratchev, 2021/07/24
- Re: Passing list of filename suffixes to script., Alex fxmbsw7 Ratchev, 2021/07/24
- Re: Passing list of filename suffixes to script., Alex fxmbsw7 Ratchev, 2021/07/24
- Passing list of filename suffixes to script., dora-solomon, 2021/07/24
- Re: Passing list of filename suffixes to script., Alex fxmbsw7 Ratchev, 2021/07/24
- Re: Passing list of filename suffixes to script., Andreas Kusalananda Kähäri, 2021/07/24
- Passing list of filename suffixes to script., dora-solomon, 2021/07/24