This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: bash: Word splitting but when?


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@dessent.net
> To: cygwin@cygwin.com
> Subject: Re: bash: Word splitting but when?
>
> sbremal@hotmail.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]