Re: [ssfr] Récupérer $1 dans une fonction

[ Thread Index | Date Index | More debianworld.org/shellscript-fr Archives ]


On Mon, Jul 07, 2008 at 09:29:24AM +0200, steve wrote:
> function hello {
> 	echo "\$1 vaut $1"
> }
> 
> hello

hello sans argument .. faut lui passer les arguments transmis au script
:

hello "$@"

attention: c'est bien

hello "$@"

et pas 

hello $@
hello $*
hello "$*"

cf ma conf aux rmll:

http://hyperion.u-strassbg.fr/sh

(ne pas bookmarker: ca va degager sur le site des rmll)



---


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/