[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-team] Re: [linux-team] gnome-linuxconf et gnome-menu ainsi que d'autres problèmes
- To: linux-team@rtfm.be
- Subject: [linux-team] Re: [linux-team] gnome-linuxconf et gnome-menu ainsi que d'autres problèmes
- From: Pascal Bleser <pbleser@atos-group.com>
- Date: Mon, 26 Jul 1999 09:11:35 +0200
- In-reply-to: <>; from Zampelli Stephane on Fri, Jul 23, 1999 at 11:46:14PM +0200
- Mail-followup-to: linux-team@rtfm.be
- Organisation: LinuxBe.org (don't fear the penguin)
- References: <>
- Reply-to: linux-team@rtfm.be
- Sender: owner-linux-team@rtfm.be
On Fri, Jul 23, 1999 at 11:46:14PM +0200, Zampelli Stephane wrote:
> D'autre part, comment modifier le fichier X suivant pour
> qu'il
> puisse accepter en argument le chemin et le nom du fichier ?
>
> #!/bin/bash
> find <chemin> -name '*.i386.rpm' | \
> while read l
> do
> foo="`rpm -qlp $l | grep <fichier>`"
> [ -n "$foo" ] && echo $l: $foo
> done
#!/bin/bash
chemin="$1"
fichier="$2"
find "$chemin" -name '*.i386.rpm' | \
while read l
do
foo="`rpm -qlp $l | grep \"$fichier\"`"
[ -n "$foo" ] && echo $l: $foo
done
voilà ;))
Le chemin est le 1er argument ($1) et le fichier le 2ème ($2).
Pour bien faire, faudrait tester si le script reçoit bien 2 arguments.
Ajoute ceci au début (après #!/bin/bash):
if [ $# -lt 2 ]; then
echo "Usage: "`basename $0`" <path> <filename>"
exit 1
fi
> ( je dois taper sh X pour l'exécuter, meme apres un chmod x+a X ...
> normal ? Problème de shell ? )
pas normal, ça...
Faut faire "chmod a+x X", remarque ;)
> Il parait qu'il y a une liste pour debutant; plein de
> curiosité
> je suis retourne sur le site rtfm et il n'y a aucune allusion a
> cette
> liste. Comment s'y inscrire ?
La liste n'est pas chez RTFM, mais chez LinuxBe.org
Va voir sur http://ml.linuxbe.org
Pour t'inscrire, envoie un mail à majordomo@lists.linuxbe.org avec
"subscribe debutant" dans le corps du message.
--
-o) Pascal Bleser | Instead of giving Windows
/\\ C++/UNIX Development | the "three-finger-salute",
_\_v ATOS Payment Systems | give it the "one-finger-
Aachen, Germany | goodbye" {jfk/propaganda}
<pbleser@atos-group.com>--------------<guru@linuxbe.org>
---------
Visit the Linux Supertore Online: http://www.redcorp.com !
If you want to be deleted from the list, send a mail to
majordomo@rtfm.be with "unsubscribe linux-team" in the body.