Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #13766

Double substitution issue

From William Entriken <fulldecent@gmail.com>
Newsgroups gnu.bash.bug
Subject Double substitution issue
Date 2018-02-28 03:25 -0500
Message-ID <mailman.9859.1519829279.27995.bug-bash@gnu.org> (permalink)

Show all headers | 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 | NextNext in thread | Find similar | Unroll thread


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