【发布时间】:2017-08-07 01:36:57
【问题描述】:
我的 shell 脚本像这样调用 python 脚本:
python take_user_input.py
take_user_input.py 脚本在被调用后要求用户输入,如下所示:
$ python take_user_input.py
Please enter your username: <expects user to enter username>
Please enter your email: <expects user to enter email>
我无法修改take_user_input.py 脚本,因为它是另一个包的一部分。
问题:是否可以在 shell 脚本中指定用户名和电子邮件,以便在调用 python 脚本后自动获取这些值?
【问题讨论】:
-
你需要这里文档功能tldp.org/LDP/abs/html/here-docs.html