[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with brace expansion
From: |
Chris F.A. Johnson |
Subject: |
Re: Problem with brace expansion |
Date: |
Tue, 21 Apr 2015 19:15:48 -0400 (EDT) |
User-agent: |
Alpine 2.10 (DEB 1266 2009-07-14) |
On Tue, 21 Apr 2015, Dr Alun J. Carr wrote:
There appears to be a bug in bash when using a variable in curly
brace expansion, e.g., {1..$n}. I have put the two following test
scripts in the attached files looper1.sh and looper2.sh:
Brace expansion is done before variable expansion:
The order of expansions is: brace expansion; tilde expansion,
parameter and variable expansion, arithmetic expansion, and
command substitution (done in a left-to-right fashion); word
splitting; and pathname expansion.
Neither pdksh (which installs as ksh using homebrew) nor dash handle either
case correctly:
Neither pdksh nor dash has brace expansion.
--
Chris F.A. Johnson, <http://cfajohnson.com>