[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: doesn't bash do variable subst. or quote removal on function stateme
From: |
Chet Ramey |
Subject: |
Re: doesn't bash do variable subst. or quote removal on function statement |
Date: |
Wed, 13 Jan 2016 14:25:46 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
On 1/13/16 12:20 PM, Linda Walsh wrote:
> It doesn't seem very consistent to choose (()) over [] -- why come up with
> a special longer operator for arith eval, when [] was already used for
> arith evaluation in array indexing?
http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_06_04
"In early proposals, a form $[expression] was used. It was functionally
equivalent to the "$(())" of the current text, but objections were lodged
that the 1988 KornShell had already implemented "$(())" and there was no
compelling reason to invent yet another syntax. Furthermore, the "$[]"
syntax had a minor incompatibility involving the patterns in case
statements."
Remember that Posix doesn't standardize arrays.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- doesn't bash do variable subst. or quote removal on function statement, (continued)
- doesn't bash do variable subst. or quote removal on function statement, Linda Walsh, 2016/01/09
- Re: doesn't bash do variable subst. or quote removal on function statement, Andreas Schwab, 2016/01/10
- Re: differences in Q.-removal, var-expansion and allowed characters in fn & var names, Linda Walsh, 2016/01/10
- Re: differences in Q.-removal, var-expansion and allowed characters in fn & var names, Chet Ramey, 2016/01/11
- Re: doesn't bash do variable subst. or quote removal on function statement, Chet Ramey, 2016/01/11
- Re: doesn't bash do variable subst. or quote removal on function statement, Linda Walsh, 2016/01/12
- Re: doesn't bash do variable subst. or quote removal on function statement, Greg Wooledge, 2016/01/12
- Re: doesn't bash do variable subst. or quote removal on function statement, Linda Walsh, 2016/01/12
- Re: doesn't bash do variable subst. or quote removal on function statement, Chet Ramey, 2016/01/13
- Re: doesn't bash do variable subst. or quote removal on function statement, Linda Walsh, 2016/01/13
- Re: doesn't bash do variable subst. or quote removal on function statement,
Chet Ramey <=
- Re: doesn't bash do variable subst. or quote removal on function statement, Chet Ramey, 2016/01/13
- Re: aliases v. functions; command extension? (-f & -F)?, Chet Ramey, 2016/01/11
- Re: aliases v. functions; command extension? (-f & -F)?, Reuti, 2016/01/11
- Re: aliases v. functions; command extension? (-f & -F)?, Chet Ramey, 2016/01/11
Re: 'official function declaration format' doesn't work if alias defined, Eric Cook, 2016/01/09