-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

en effet, ca fonctionne aussi, sauf que echo ${f%%.ebuild} ne fonctionne pas 
(command not found), ni {$f%%.ebuild}, par contre echo $f fonctionne. je peux 
toujours lui faire un sed...

Merci!!


On Wednesday 23 October 2002 18:56, Thomas Silvestre wrote:
> j'ai essayé de comprendre ce que tu voulais faire, et je me suis rendu
> compte que tu vas scanner tout /var/db/pkg, pour en ressortir les
> fichiers qui contiennent ebuild.
> je pense que find est plus performant pour ce genre de choses non?
>
> voilà ma proposition (rien d'indécent ;-) ):
> #!/bin/bash
>
> pushd .
> cd /var/db/pkg
> for f in `find . -name *.ebuild`
> do
>    echo ${f%%.ebuild}
> done
> popd
>
> c'est le ${f%%.ebuild} qui enlève le .ebuild (merci Pascal pour un mail
> à ce sujet un jour ;-) )
> les pushd et popd te permettent de te déplacer dans l'arborescence et de
> revenir à ton point de départ (ça évite les cut)
>
> je crois qu'il y a moyen de tout faire de le find avec la commande
> -exec, mais je n'ai pas trouvé comment s'en sortir avec la substitution:
> ... -exec echo ${{}%%.ebuild}  (le {} remplace le fichier trouvé)
>
> Fabian Vilers wrote:
> > (sorry pour le mail bidon précédent)
> >
> > hello,
> >
> > voici un script:
> >
> > du -cha /var/db/pkg | grep ebuild | cut -c 18-
> >
> > voici un bout de son résultat:
> >
> > app-crypt/gnupg-1.0.7/gnupg-1.0.7.ebuild
> > app-crypt/mhash-0.8.16/mhash-0.8.16.ebuild
> > app-crypt/gpa-0.4.3/gpa-0.4.3.ebuild
> >
> > j'aimerais supprimer le '.ebulid' seulement cut ne me propose pas de
> > coupé les x derniers caractères de la ligne. je connais pas trop
> > textutils, qqn peut il m'aider?
> >
> > merci :-)
> >
> >
> > *This electronic transmission and any attached document is intended
> > exclusively for the person or entity to whom it is addressed and may
> > contain confidential and/or privileged material. If you are not the
> > intended recipient, any disclosure, reproduction, copying, distribution,
> > or other dissemination or use of this communication is strictly
> > prohibited. If you receive this message in error, please contact the
> > sender and delete the material from any and all computers. SPEOS does
> > not warrant a proper and complete transmission of this information, nor
> > does it accept liability for any delays.*

- -- 
# Fabian Vilers
# [EMAIL PROTECTED]
# http://fabianvilers.linux-fan.com
#
# Powered by Gentoo

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9ttd23Qzx239StfYRAruuAKCMt/xPFMh+bFBzww21PW04txNw7QCfUYOl
Un4AIsm+DwlEQuddRZBxklc=
=03v9
-----END PGP SIGNATURE-----



_______________________________________________________
Linux Mailing List - http://www.unixtech.be
Subscribe/Unsubscribe: http://www.unixtech.be/mailman/listinfo/linux
Archives: http://www.mail-archive.com/linux@;lists.unixtech.be
IRC: efnet.skynet.be:6667 - #unixtech

Répondre à