[CentOS] script help

Thu Nov 1 18:36:29 UTC 2007
James A. Peltier <jpeltier at cs.sfu.ca>

adrian kok wrote:
> Hi all 
> 
> how can I have script to rename the following
> directory pattern from
> 
>  
> 
> from 
> 
> dir-192.168.30.0   
> dir-192.168.30.144 
> dir-192.168.30.184
> 
> 
> To:
> 
> 
> dir-10.0.30.0   
> dir-10.0.30.144 
> dir-10.0.30.184

If this is to rename individual files from 192.168.30.0=>192.168.30.144 then

for ((  i = 0 ;  i <= 143;  i++  ))
do
   mv 192.168.30.$i 10.0.30.$i
done

> thank you

You're welcome.


http://www.freeos.com/guides/lsst/

-- 
James A. Peltier
Technical Director, RHCE
SCIRF | GrUVi @ Simon Fraser University - Burnaby Campus
Phone   : 778-782-3610
Fax     : 778-782-3045
Mobile  : 778-840-6434
E-Mail  : jpeltier at cs.sfu.ca
Website : http://gruvi.cs.sfu.ca | http://scirf.cs.sfu.ca
MSN     : subatomic_spam at hotmail.com