Re: extfs audio.in & hp48.in patch



Oswald Buddenhagen wrote:
-$KERMIT -C "SET EXIT WARNING OFF,REMOTE $*,QUIT"
+$KERMIT -C "SET EXIT WARNING OFF,REMOTE $@,QUIT"

counter-productive:

# set -- one two three
# for i in "you $@ suck"; do echo $i; done
you one
two
three suck
#

Yes, you're right. Thanks for pointing this out. I have changed this to
$KERMIT -C "SET EXIT WARNING OFF,REMOTE $1,QUIT"
and quoted the places where hp48_cmd is called. I think this is easier to understand. (And I don't like $*.)

[Offtopic:] Can you tell me a situation where you use $*?

i suggest you read and internalize a [posix] shell documentation (ash/dash
seems like a good candidate) before starting to fix shell scripts. btw,
the autoconf manual gives a good overview of shell incompatibilites -
for those of you who think one can't overdo quoting.

Well, I think that it is not easy to do overquoting the wrong way. The approach that I like is to quote everything that I consider to be a string. This includes arguments to `case'.

Roland



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