copying multiple files
David Henderson
dhenderson at digital-pipe.com
Mon Nov 21 22:06:54 UTC 2016
Thanks again for your continued help Grant. Unfortunately the file
names are not actually similar as in the example (e.g. help.txt,
world.png, ...) so using braces won't help either. Any other
thoughts? Currently I'm forced to use a combination of find and cp -
ugh - just to reduce the number of lines necessary for the
operation...
Thanks,
Dave
On 11/21/16, Grant Edwards <grant.b.edwards at gmail.com> wrote:
> On 2016-11-21, David Henderson <dhenderson at digital-pipe.com> wrote:
>> On 11/21/16, Grant Edwards <grant.b.edwards at gmail.com> wrote:
>>> On 2016-11-21, David Henderson <dhenderson at digital-pipe.com> wrote:
>>>
>>>> cp -f /tmp/test/{a.txt,b.txt,c.txt} /tmp/test2/{1.txt,2.txt,3.txt}
>>>> /tmp/dest
>>>
>>>> This keeps failing. Is this implemented in BB?
>>>
>>> Try this:
>>>
>>> $ busybox ash
>>> ~ $ echo /tmp/test/{a.txt,b.txt,c.txt}
>>> /tmp/test/{a.txt,b.txt,c.txt}
>>>
>>> It appears that the busybox shell does not implement bash/C shell
>>> alternation (aka "brace expansion"). None of the busybox builds I
>>> have on hand do anyway, and I don't see any options in the config file
>>> to enable such a feature...
>
>> Hey Grant, thanks for the reply! Unfortunately that command will just
>> echo what you type to the screen, not actually copy anything.
>
> I know. I was showing you how to determine if alternation (brace
> expansion) wasn't happenning. It doesn't on any of my builds of
> busybox.
>
>> Any other thoughts?
>
> Don't try to use alternation:
>
> cp -f /tmp/test/[abc].txt /tmp/test2/[123].txt /tmp/dest
>
> --
> Grant Edwards grant.b.edwards Yow! ... I think I'd
> at better go back to my
> DESK
> gmail.com and toy with a few
> common
> MISAPPREHENSIONS ...
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
>
More information about the busybox
mailing list