From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7004 invoked from network); 21 Jun 2002 05:19:28 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 21 Jun 2002 05:19:28 -0000 Received: (qmail 26620 invoked by alias); 21 Jun 2002 05:19:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17345 Received: (qmail 26608 invoked from network); 21 Jun 2002 05:19:23 -0000 From: Borsenkow Andrej To: jos@catnook.com, "'Clint Adams'" Cc: zsh-workers@sunsite.dk Subject: RE: posix compliance Date: Fri, 21 Jun 2002 09:19:15 +0400 Message-ID: <6134254DE87BD411908B00A0C99B044F03A0B2D3@mowd019a.mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 In-Reply-To: <20020620180526.GA65950@lizzy.catnook.com> x-mimeole: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal > A quick report from UseNIX: One thing Jordan Hubbard of Apple mentioned was > that our positional parameters ($1, $2, etc.) are assignable whereas they > are > not in bash (Chet Ramey, who was also present, confirmed this). The bash > behavior is apparently what POSIX specifies. It depends. SUS V3 (which I hope is quite reliable representation of POSIX) says that interpretation of WORD1=WORD2 where WORD1 is not a name is implementation defined. It may be legally interpreted as assignment. You are correct that in case of ${WORD1=WORD2} it is prohibited: ${parameter:=word} Assign Default Values. If parameter is unset or null, the expansion of word shall be assigned to parameter. In all cases, the final value of parameter shall be substituted. Only variables, not positional parameters or special parameters, can be assigned in this way. In case of read built-in it is unclear. There are no explicit restrictions; one may infer that special parameters are invalid only from this line: var The name of an existing or nonexisting shell variable. and only due to usage of "name" here. -andrej