RE: copying multiple files

2016-11-22 Thread Cathey, Jim
>I want to make this the shortest command possible is because I don't want to >add 60 lines of code to a script just to copy >10 files (with error control and so forth). This sounds like an excellent opportunity to make a function, or to feed an embedded pipe with a list... while read f; do

Re: copying multiple files

2016-11-22 Thread Grant Edwards
On 2016-11-22, David Henderson wrote: > Good morning Jim, thanks for your help as well! After talking with > Grant yesterday it dawned on me that this must be a bash-ism. Yep. It's a C-shell-ism that was adopted by bash.

Re: copying multiple files

2016-11-22 Thread David Henderson
d of atomic operation. Are you > after a fewest-line-count award? > > -- Jim > > -Original Message- > From: busybox [mailto:busybox-boun...@busybox.net] On Behalf Of David > Henderson > Sent: Monday, November 21, 2016 2:07 PM > To: Grant Edwards > Cc: busyb

RE: copying multiple files

2016-11-21 Thread Cathey, Jim
kind of atomic operation. Are you after a fewest-line-count award? -- Jim -Original Message- From: busybox [mailto:busybox-boun...@busybox.net] On Behalf Of David Henderson Sent: Monday, November 21, 2016 2:07 PM To: Grant Edwards Cc: busybox@busybox.net Subject: Re: copying multiple

Re: copying multiple files

2016-11-21 Thread Ralf Friedl
David Henderson wrote: Good afternoon. I have several files in two different directories that I'm trying to copy in a destination using: 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? In general, and here in

Re: copying multiple files

2016-11-21 Thread David Henderson
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

Re: copying multiple files

2016-11-21 Thread Grant Edwards
On 2016-11-21, David Henderson wrote: > On 11/21/16, Grant Edwards wrote: >> On 2016-11-21, David Henderson wrote: >> >>> cp -f /tmp/test/{a.txt,b.txt,c.txt} /tmp/test2/{1.txt,2.txt,3.txt} /tmp/dest >> >>> This

Re: copying multiple files

2016-11-21 Thread David Henderson
Hey Grant, thanks for the reply! Unfortunately that command will just echo what you type to the screen, not actually copy anything. Any other thoughts? Thanks, Dave On 11/21/16, Grant Edwards wrote: > On 2016-11-21, David Henderson

Re: copying multiple files

2016-11-21 Thread Grant Edwards
On 2016-11-21, David Henderson wrote: > Good afternoon. I have several files in two different directories > that I'm trying to copy in a destination using: > > cp -f /tmp/test/{a.txt,b.txt,c.txt} /tmp/test2/{1.txt,2.txt,3.txt} /tmp/dest > > This keeps failing. Is

copying multiple files

2016-11-21 Thread David Henderson
Good afternoon. I have several files in two different directories that I'm trying to copy in a destination using: 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? Thanks, Dave