Re: script help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Ross S. W. Walker wrote:
> 
> Try:
> 
> # find <parent dir> -type d -name dir-192.168.\* -exec mv \{\} `echo
> \{\} | sed 's/192\.168\./10\.0\./'` \;
> 
> That should recursively rename all directories from one naming scheme to
> another.

... except for the fact that the `echo \{\} ...` will be evaluated by
the shell and not find, so this is the same as:

find <parent dir> -type d -name dir-192.168.\* -exec mv \{\} \{\} \;

Not very useful ;)

Cheers,
Michael
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux