Aide Linux - Liste de diffusion Ze-Linux
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell]



Merci

pour l'info ca marche du tonnere, mais cela marche si la page ce trouve juste apres la homedirectory si il ya plus repertoire entre les deux comment je peut faire, vu que le nombre de repertoire est aleatoire  en fonction des sites

plus claire si jai ca avant
/www/perso/b/e/s/t/i/a/l/bestial/toto/titi/index.html
/www/perso/c/o/k/a/l/i/a/u/s/cokaliaus/toto/index.htm
/www/perso/t/o/t/o/toto/essai/test/camarche/non/images.html
/www/perso/g/a/l/a/b/galab/essai/oulafic.htm


je veut ca
http://perso.com/bestial/toto/titi/index.html
http://perso.com/cokaliaus/toto/index.htm
http://perso.com/essai/test/camarche/non/images.html
http://perso.com/galab/essai/oulafic.htm




fbelhamel a écrit:
oui je sais faire une boucle et puis c'est impecable ca marche du tonnere, merci beaucoup pour ton aide

Olivier Kaloudoff a écrit:
On Tue, 7 Oct 2003, fbelhamel wrote:

  
bonjour 

je voudrais savoir comment je pourrais remplacer les homedirectory par une url

avant j' ai ca
    
/www/perso/b/e/s/t/i/a/l/bestial/index.html
/www/perso/c/o/k/a/l/i/a/u/s/cokaliaus//index.htm
/www/perso/t/o/t/o/toto/images.html
/www/perso/g/a/l/a/b/galab/fic.htm


je veut ca
http://perso.com/bestial/index.html
http://perso.com/cokaliaus/index.html
http://perso.com/toto/images.html	
http://perso.com/galab/fic.htm
      


echo /www/perso/g/a/l/a/b/galab/fic.htm | awk -F'/' '{ print 
"http://perso.com/"$(NF-1)"/"$NF }'

http://perso.com/galab/fic.htm


Tu sais faire une boucle en shell ?

----------------------------------
Informations, désabonnement, règles, obligations sur la liste Aide-Linux :
http://lists.ze-linux.org/howto_ml.html

  




Aide Linux - Liste de diffusion Ze-Linux