bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Double substitution issue


From: William Entriken
Subject: Double substitution issue
Date: Wed, 28 Feb 2018 03:25:21 -0500

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]