View Single Post
  #6   (View Single Post)  
Old 28th May 2011
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 842

Daffy, glad it worked easily for you.

That said, each of the suggested approaches has its strong and weak points. If you're feeling inquisitive, some things to think about would be:

1) What happens in each approach if nothing matches the pattern?

2) What happens if a directory matches the pattern?

3) How many times is the cp command run, each way?

4) What other goodies can be gleaned from the man pages of your implementation of cp, find and your shell?
Reply With Quote