Article View: gnu.bash.bug
Article #1035for without in
From: Brian Fox
Date: Thu, 14 Dec 1989 09:08
Date: Thu, 14 Dec 1989 09:08
22 lines
913 bytes
913 bytes
Date: 14 Dec 89 05:10:31 GMT
From: ogicse!reed!trost@caesar.cs.montana.edu (Bill Trost)
Sender: bug-bash-request@prep.ai.mit.edu
I've noticed that something like
spam() { for i; do echo $i; done }
expands into
spam () { for i in $*
do
echo $i
done }
(direct shell output). Personally, I would expect "$@" instead of $*
in the for statement. What is the "official statement" on this?
You are right. The shell should expand the null argument to "$@".
Brian
Technical Details
Message-ID:
<8912140908.AA05253@sbphy.Ucsb.EDU>Path:
arc1-ca.pugleaf.net!utzoo!telly!philmtl!uunet!tut.cis.ohio-state.edu!sbphy.ai.mit.edu!bfoxReferences:
<13739@reed.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!philmtl!uunet!tut.cis.ohio-state.edu!sbphy.ai.mit.edu!bfox From: bfox@sbphy.ai.mit.edu (Brian Fox) Newsgroups: gnu.bash.bug Subject: for without in Message-ID: <8912140908.AA05253@sbphy.Ucsb.EDU> Date: 14 Dec 89 09:08:03 GMT References: <13739@reed.UUCP> Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 22