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