delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/10/22/10:49:27

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <BAY119-W2557E1B722202805AFB738A9290@phx.gbl>
From: <sbremal AT hotmail DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: bash: Word splitting but when?
Date: Wed, 22 Oct 2008 14:48:27 +0000
In-Reply-To: <48FF353B.529292C2@dessent.net>
References: <1224680840 DOT 20653 DOT ezmlm AT cygwin DOT com> <BAY119-W554558D88293827703F914A9290 AT phx DOT gbl> <BAY119-W5412E8E2CD245EBD78B68EA9290 AT phx DOT gbl> <48FF353B DOT 529292C2 AT dessent DOT net>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Thank you for pointing out that section of the manual. Surely this explains the behaviour...

Cheers,
Balazs

> Date: Wed, 22 Oct 2008 07:14:19 -0700
> From: brian AT dessent DOT net
> To: cygwin AT cygwin DOT com
> Subject: Re: bash: Word splitting but when?
>
> sbremal AT hotmail DOT com wrote:
>
>> the ouput of $(echo '1 2 3 x') should go through word splitting and x
>
> Word splitting does not occur in the right-hand side of an assignment.
> From the manual:
>
> A variable may be assigned to by a statement of the form
>
> name=[value]
>
> If value is not given, the variable is assigned the null string.
> All values undergo tilde expansion, parameter and variable expan-
> sion, command substitution, arithmetic expansion, and quote
> removal (see EXPANSION below). If the variable has its integer
> attribute set, then value is evaluated as an arithmetic expres-
> sion even if the $((...)) expansion is not used (see Arithmetic
> Expansion below). Word splitting is not performed, with the
> exception of "$@" as explained below under Special Parameters.
> Pathname expansion is not performed. Assignment statements may
> also appear as arguments to the alias, declare, typeset, export,
> readonly, and local builtin commands.
>
> Brian
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>

_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019