[OE-core] [PATCH 7/8] oe-git-proxy.sh: Add a new comprehensive git proxy script

Enrico Scholz enrico.scholz at sigma-chemnitz.de
Tue Feb 5 16:36:40 UTC 2013


Darren Hart <dvhart at linux.intel.com> writes:

>>> +	$NC -X connect $*
>> 
>> why '$*' but not '"$@*"'?
>> 
> I'm not familiar with $@*

sorry... I meant "$@"


> As for $* versus $@, the issue is how the arguments are presented. $*
> as a single word, $@ each argument is quoted separately. I believe I
> ran into issues with $@. I haven't had any trouble with $*.

$* is causing trouble all the time because it does not retain whitespaces
or empty parameters.  There are only very few cases, where $* makes sense.


> Is there a particular use case where you can see this failing as is?

"$@" is just the right thing to do in this situation.  E.g. when your
script is called as

| oe-git-proxy.sh "${HOST}" "${PORT}"

and HOST is undefined due to some reason, you will try to connect to
"${PORT}" with $*.  The "$@" will cause nc to complain about the broken
HOST parameter.


Btw...

| exec $NC $METHOD "$@"

would be the school book implementation for the thing you want to do...



Enrico




More information about the Openembedded-core mailing list