YOL*_*OLT 2 shell zsh sh brace-expansion
Zsh 不执行大括号扩展,但仅在使用/bin/sh链接调用时才执行。
$ /bin/sh --version
zsh 5.8 (x86_64-apple-darwin20.0)
$ zsh --version
zsh 5.8 (x86_64-apple-darwin20.0)
$ /bin/sh -c "echo {1..3}"
{1..3}
$ zsh -c "echo {1..3}"
1 2 3
Run Code Online (Sandbox Code Playgroud)
这是怎么回事?