Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我跑
echo "read -p 'test'" | sh
什么都没发生。怎样才能达到我想要的效果?
注意:我想这样做的原因是因为我在 github 上保留了许多这样的脚本,并且我通过这样做来运行它们
curl https://gist.github.com/drew-gross/5706361/raw/update_settings_and_dotfiles.sh | sh
将脚本通过管道传送到 shell 意味着 shell 不是交互式的。尝试将其采购到当前的 shell 中:
. <(echo "read -p test") . <(curl "$url")