bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question on $@ vs $@$@


From: Steffen Nurpmeso
Subject: Re: Question on $@ vs $@$@
Date: Fri, 23 Aug 2024 01:31:22 +0200
User-agent: s-nail v14.9.25-599-g5c75a327b2

Steffen Nurpmeso wrote in
 <20240822232849.ib5zNN-v@steffen%sdaoden.eu>:
 ...
 |  a() { echo $#,1=$1,2=$2,"$*",$*,; }
 |  set -- a b c
 |  echo 2
 |  IFS=:; echo "$*"$*; a $* "$*";
 |
 |then bash gives me
 |
 |  2
 |  a:b:ca b c
 |  4,1=a,2=b,a:b:c:a:b:c,a b c a b c,
 |
 |whereas my little mailer says
 ...
 |  2,1=a b c,[.]
 |
 |What i do not understand is the difference in between the $*
 |expansion in the call to "a".
 ...

Having said that, now i am so confused that i even have forgotten
why i create the SPACE separation *at all*, ie, as $1=a, $2=b and
$3=c, when i create $* from these.

Good night from Germany!
(And thanks for any hint)

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]