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
スクリプトをシェルにパイプすると、シェルは対話型ではなくなります。それを現在のシェルにソースしてみてください:
. <(echo "read -p test") . <(curl "$url")