On Sat, Nov 27, 2010 at 3:43 AM, Kaushal Shriyan
<kaushalshri...@gmail.com> wrote:
> Hi,
> In my home folder I have 6 tomcat directories under
> /home/kaushal/tomcat0......6
> Under each of these tomcats there are sub folder conf and inside these conf
> there is a file by the name server.xml so for example I have
> tomcat0,tomcat1,tomcat2,tomcat3,tomcat4,tomcat5 so i need to edit server.xml
> and set port numbers for tomcat0 to 8080 tomcat1 to 8081 and similarly for
> others,the other way is to go to individual directory and do it
>
> Please suggest/guide

for i in {0..6} # or $(seq 0 6)
do
 sed -i "s/8080/808$i/" tomcat$i/.../server.xml
done

Regards,


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktin6b5pslqqeeunwcoobx2ts2kymgkty6-4me...@mail.gmail.com

Reply via email to