macOS Sierra: ${TAIL} is not working in zsh
我试图在zsh(噢,我的zsh)中执行一些bash脚本。我发现$tail不在zsh工作。
猛击:
bash-3.2$ ${CD} /tmp; echo"test">> test.txt; ${TAIL} test.txt
bash: /tmp: is a directory
test
ZSH:
~ ${CD} /tmp; echo"test">> test.txt; ${TAIL} test.txt
zsh: command not found: tail -f
? /tmp
但是直接用尾巴是可以的
? /tmp tail -f test.txt
test
testwhereis tail
/usr/bin/tail
echo $PATH
/usr/local/bin:/usr/bin
我认为这是
与
1 | var="foo bar" |
手动启用标志为
1 | setopt shwordsplit |
那就和
1 | echo"test">> test.txt; ${TAIL} test.txt |