On Mon, 04 Nov 2002 15:34:24 +0100
Pascal Bleser <[EMAIL PROTECTED]> wrote:
> ...
> > mais si j'ai ceci dans mon .bashrc :
> > del ()
> > {
> > echo -n 'supression de :'$*
> > mv $* $HOME/.corbeille/
> > }
> > del *
> ...
> > Tout de suite c'est moins marrant et ce que je ne comprand pas c'est
> > $* prend le non du fichier en entier echo est juste l� pour le
> > montrer.
>
> Extrait de man bash:
>
> * Expands to the positional parameters, starting from one. When the
> expansion occurs within double quotes, it expands to a single word
> with the value of each parameter separated by the first character of
> the IFS special variable. That is, "$*" is equivalent to
> "$1c$2c...", where c is the first character of the value of the IFS
> variable. If IFS is unset, the parameters are separated by spaces. If
> IFS is null, the parameters are joined without intervening
> separators.
>
> @ Expands to the positional parameters, starting from one. When the
> expansion occurs within double quotes, each parameter expands to a
> separate word. That is, "$@" is equivalent to "$1" "$2" ...
> When there are no positional parameters, "$@" and $@ expand to nothing
> (i.e., they are removed).
>
> Donc il te suffit de remplacer $* par $@
Juste merci!
Sans les "" chez moi �a ne marche toujours pas avec les noms de fichiers
qui contiennent des espaces. Petite pr�cision, remplacer * par @ ET placer
$@ entre "" (When the expansion occurs within double quotes)
Donc avec "$@" tout vas bien merci � tous!
Beno�t
_______________________________________________________
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.unixtech.be:6667 - #unixtech