Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: replace all versions of a file in hierachy with a more recent version



Peter Stephenson <pws@xxxxxxx> wrote in
news:200606161249.k5GCnXdp009969@xxxxxxxxxxxxxx: 

> zzapper wrote:
>> I want to replace all versions of a file in hierachy with a more
>> recent version
> 
> Depending on what the criterion is for files that need replacing,
> 
>   for f in oldlocation/**/*(.); do
>     cp newlocation${f##oldlocation} $f
>   done
> 
> pws
> 
PWS,
Wouldn't a find be better?

> To access the latest news from CSR copy this link into a web browser: 
> http://www.csr.com/email_sig.php 
> 



-- 
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips



Messages sorted by: Reverse Date, Date, Thread, Author