Le 09/11/06, Bernard Siaud [EMAIL PROTECTED] a écrit :
Je comprends enfin pour le cp ! Comment faire pour détourner cet
alias dans un script ? Il me pose souvent problème !
En mettant /usr/bin/cp, ça devrait marcher. Il me semble qu'il existe
un moyen pour exécuter la vraie commande hors de
Le 09/11/06, Bernard Siaud [EMAIL PROTECTED] a écrit :
Si j'ai compris le how-to, je transforme ma commande en :
`echo sed -e [EMAIL PROTECTED]/[EMAIL PROTECTED][EMAIL PROTECTED]
$racine/cache/$1/index.php`
$old_pwd/$1/index.php
Attends, tu cherches à remplacer /$1 par $1 dans le fichier
Le 10/11/06, Bernard Siaud [EMAIL PROTECTED] a écrit :
C'était le dans la chaîne qui m'avait fait peur !
Oui mais tu avais bien pensé à le protéger par l'antislash, donc plus
de raison d'avoir peur :)
Sauf de $1, bien sûr ;) Si $1 contient un caractère ou un
texte particulier pour sed, ça
Bonjour
Voici où j'en suis :
$ cp -f index.php test.php;sed -e 's///xorg.conf/xorg.conf/g' test.php
cp: écraser `test.php'?y
sed: -e expression n°1, caractÚre 6: option inconnue pour `s'
Je suis face à deux problèmes :
Le premier pas grave, ne comprend pas l'option -f du cp (histoire de ne
Le 09/11/06, Bernard Siaud [EMAIL PROTECTED] a écrit :
$ cp -f index.php test.php;sed -e 's///xorg.conf/xorg.conf/g'
test.php cp: écraser `test.php'?y
sed: -e expression n°1, caractère 6: option inconnue pour `s'
Tu cherches à remplacer quoi par quoi ?
Pour le cp, je pense que c'est dû à
Christophe Gaubert a écrit :
Le 09/11/06, Bernard Siaud [EMAIL PROTECTED] a écrit :
$ cp -f index.php test.php;sed -e 's///xorg.conf/xorg.conf/g'
L'erreur était
sed -e 's/\/xorg.conf/xorg.conf/g'
= remplacer /xorg.conf par xorg.conf
À ce propos, pourquoi le /g à la fin ?
test.php
On Thu, 09 Nov 2006 21:10:54 +0100
Bernard Siaud [EMAIL PROTECTED] wrote:
Christophe Gaubert a écrit :
Le 09/11/06, Bernard Siaud [EMAIL PROTECTED] a écrit :
$ cp -f index.php test.php;sed -e 's///xorg.conf/xorg.conf/g'
L'erreur était
sed -e 's/\/xorg.conf/xorg.conf/g'
=
jipe a écrit :
On Thu, 09 Nov 2006 21:10:54 +0100
Bernard Siaud [EMAIL PROTECTED] wrote:
Christophe Gaubert a écrit :
Le 09/11/06, Bernard Siaud [EMAIL PROTECTED] a écrit :
$ cp -f index.php test.php;sed -e 's///xorg.conf/xorg.conf/g'
L'erreur était
sed -e