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
$racine/cache/$1/index.php et à placer le résultat dans
$old_pwd/$1/index.php, c'est ça ?

Je ne pense pas que le echo soit nécessaire.

$ cat a.txt
"/toto dfelkfjrjf
sdcjncknd "/toto x frfr

$ cat toto.sh
#!/bin/bash

sed -e "s,\"/$1,\"$1,g" a.txt > b.txt

$ ./toto.sh toto

$ cat b.txt
"toto dfelkfjrjf
sdcjncknd "toto x frfr


-- 
Christophe Gaubert
http://ch4tn01r.free.fr/blog
Participez à la liste Avis de citoyens :
http://fr.groups.yahoo.com/group/Avis_de_citoyens/

=========================================
Vous souhaitez acquerir votre pack ou des services Mandriva?
Rendez-vous sur "http://store.mandriva.com";.
Rejoignez le club Mandriva : http://club.mandriva.com
=========================================

Répondre à