Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #13766
| Path | csiph.com!weretis.net!feeder6.news.weretis.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!171.64.64.130.MISMATCH!usenet.stanford.edu!not-for-mail |
|---|---|
| From | William Entriken <fulldecent@gmail.com> |
| Newsgroups | gnu.bash.bug |
| Subject | Double substitution issue |
| Date | Wed, 28 Feb 2018 03:25:21 -0500 |
| Lines | 28 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.9859.1519829279.27995.bug-bash@gnu.org> (permalink) |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| X-Trace | usenet.stanford.edu 1519829279 22655 208.118.235.17 (28 Feb 2018 14:47:59 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-bash@gnu.org |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=V/g6Q+VMUd8ibhEUyFBAglrMoXjosNV3+9zbnFJESmw=; b=XCnwsVuKiVDtRgSQqD31lxX4ahd27K034EN/P5GsK07JAHMfehXk0xcH8888c2FY6r V3JFlv8KAl3RI7gaP9kKtZI5d6XNtHRvYVch3+GCIIv8iu8y3UqElWp7JytSuzLI8wgh jfuP29a2kJ4j4fTAf7Ox4dgKCPGtVcyliltRaE4are/+4nDAxeFISfOKXbkNIiNMGaJo KJEJwnyj87QnbZTAFrmm5svbizw3PhwJbz5OmFR9Mpi+rLU+VVh0ln0cvGKtH42CbE6T p4yA+oiLOqMPqjdmVBR+497a1zs1uwatglw1LIUXzb+Mllv72rYe+CSmPjt0YSHS5oFc m5dQ== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=V/g6Q+VMUd8ibhEUyFBAglrMoXjosNV3+9zbnFJESmw=; b=LhuUB7RfNVLIGuaXp56C1evS3JzeWmPdVinRRnl4l3KE1ECYeutHo98ocLgCz7PX4m IutfoVhpH/eJlzrdyJfrAzpot5c/NSuRrcO0VPSRiWHv/v1hqPHWPj2Oz1unrmSGMKgR e0FmjT5W0+PZTWl/dqZQN/hVMaZxO52sM1478BN3iClWW6SZM93EvATjXD6wZwhydhwa F1LbyFAoA87ZLpnPzHlq3h/DBaYHw4Qp1mJ4eJ+8pMr22tltxkkGtPUzQgaIedfQTGFO GqiQs+fuQrJDyKTExcZD9xja/ZYV9kayUfxbBySRXfrzr7ElwMPzHaw3tuMWFT/pHkUu 8KLw== |
| X-Gm-Message-State | APf1xPBeS4XDy02DjpvdljPiSG3LArmMDslpRYMglG7UMHj05BbXRneO sWXnpbxtVGUrcuioOqdiBisNiJgxJKlGImRD8eOdKJHU |
| X-Google-Smtp-Source | AH8x225y4gb917AclG9nLmKDtV9CcO07JLzk0GLGIsKxDtW3u07Jtc6HTlAniYBPkNZP9bNhxOphy/gJqZmE1tm1d6g= |
| X-Received | by 10.80.153.143 with SMTP id m15mr22181220edb.145.1519806321602; Wed, 28 Feb 2018 00:25:21 -0800 (PST) |
| X-detected-operating-system | by eggs.gnu.org: Genre and OS details not recognized. |
| X-Received-From | 2a00:1450:400c:c09::236 |
| X-Mailman-Approved-At | Wed, 28 Feb 2018 09:47:57 -0500 |
| X-Content-Filtered-By | Mailman/MimeDel 2.1.21 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash/> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:13766 |
Show key headers only | View raw
This behavior is different in zsh and bash, and maybe bash behavior is a
bug.
# Test case
touch 1 2 3
cat > script.sh <<EOL
from=1
to=3
ls {$from..$to}
EOL
chmod a+x script.sh
bash ./script.sh
zsh ./script.sh
# Expected
Both list files 1, 2, 3
# Actual
zsh passes.
Bash fails the chained substitution with:
ls: {1..3}: No such file or directory
Back to gnu.bash.bug | Previous | Next — Next in thread | Find similar | Unroll thread
Double substitution issue William Entriken <fulldecent@gmail.com> - 2018-02-28 03:25 -0500
Re: Double substitution issue fulldecent@gmail.com - 2018-11-20 20:16 -0800
Re: Double substitution issue Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-21 08:37 -0500
csiph-web