copying multiple files
Grant Edwards
grant.b.edwards at gmail.com
Mon Nov 21 21:54:09 UTC 2016
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 ...
More information about the busybox
mailing list