Bonjour,
Je suis en train de faire un petit script et voici ce qui me bloque:
Je sais pourquoi sed fait une erreur.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 LNG_HOME=$(pwd) PLATFORME='PROD' sed -i 's/'"DEFAULT=\/etc\/default\/$NAME_$PLATFORME"/"$LNG_HOME\/$PLATFORME\/conf\/default_$PLATFORME"'/g' $LNG_HOME/$PLATFORME/tomcat_$PLATFORME
LNG_HOME = /home/toto/lng
Le probleme est que sed reconnait le "/" comme une commande particulière.
Comment transformer "/home/toto/lng" en "\/home\/toto\/lng"?
Cordialement,
vandman
Partager