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.
我正在使用 nohup add.sh & 运行程序
此脚本在运行时从控制台获取输入。我怎样才能获得这个过程的输入流,以便我可以传递 2 个数字?
谢谢
这取决于您的脚本如何工作,但通常您可以通过管道将输入发送到另一个命令:
nohup echo "This is my input" | add.sh &
但是我不知道您是否可以使用超过 1 个参数来做到这一点。您可能需要增强您的 add.sh 脚本,以便接受和使用提供的参数。