[Ubuntu-ma] Besoin d'un script

Adnane Belmadiaf daker at ubuntu.com
Dim 8 Mai 13:10:26 UTC 2011


Bonjour,

utilise la commande "sed"
http://www.cyberciti.biz/faq/unix-linux-replace-string-words-in-many-files/

Le 8 mai 2011 12:08, Azzaddine Amjahed <aamjahed at gmail.com> a écrit :

> Assalaam alaykoum,
> Je veux remplacer toute les occurrences d'une chaine dans un fichier par
> une autre chaine qui contient un compteur incrémentale.
> Exemple : manipuler le texte  :
> ...
> <g
> ...
> <g
> ...
> <g
> ...
>
> Pour le transformer en :
> ...
> <g inkscape:label="Calque 1"      inkscape:groupmode="layer"
> id="layer1">
> ...
> <g inkscape:label="Calque 2"      inkscape:groupmode="layer"
> id="layer2">
> ...
> <g inkscape:label="Calque 3"      inkscape:groupmode="layer"
> id="layer2">
> ...
>
> J'ai essayer d'utiliser sed dans un script bash, je crois que c'est plus
> rapide.
> En fin de compte, je pense à utiliser le langage C (mais j'ai bien rester
> 'sous bash')
> Merci d'avance.
> Wa assalaam alaykoum.
>
> --
> Ubuntu-ma mailing list
> Ubuntu-ma at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-ma
>
>


-- 
Adnane Belmadiaf
----------------
Ubuntu Member
Ubuntu Moroccan Team Member
Loco Directory Hacker

https://launchpad.net/~daker
https://wiki.ubuntu.com/AdnaneBelmadiaf
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <https://lists.ubuntu.com/archives/ubuntu-ma/attachments/20110508/1c712374/attachment.html>


Plus d'informations sur la liste de diffusion Ubuntu-ma