我目前正在编写一个bash脚本,当我运行useradd命令时它需要2个输入。从bash脚本输入来自useradd的提示密码字段的命令是什么?bash脚本shell输入
1
A
回答
1
如果从标准输入读取输入,则可以这样做;
useradd <<EOF
first input
second input
EOF
但是,有些程序不会正确读取stdin来停止这种事情。
编辑
至于说在,这就是所谓的“HERE文档”,如果你想看看它。
1
+0
我应该回想起来。除了这个精确的原因以外,我已经使用了大量的时间。 – 2009-07-24 19:31:43
0
我不能打扰我的Linux系统来检查,但useradd程序仍然提示,如果你通过命令行的信息?
useradd -m -p encryptedPassword username
相关问题
- 1. Bash shell脚本
- 2. Bash/Shell脚本
- 3. shell脚本BASH
- 4. Bash shell脚本提示用户输入(CLI GUI)对话框
- 5. 将输入发送到bash的运行shell脚本
- 6. Bash Unix Shell脚本接受输入并设置系统变量
- 7. 在Bash/Shell脚本中的安全输入验证
- 8. 的Bash shell脚本变量
- 9. 测试bash shell脚本
- 10. 的Bash shell脚本回答
- 11. Automator bash shell脚本问题
- 12. 阵列在bash shell脚本
- 13. bash/shell脚本语句
- 14. unix bash shell脚本写作
- 15. perl bash脚本输出输入
- 16. Bash/shell脚本 - 函数内部的shell输出重定向
- 17. bash脚本输出
- 18. Shell脚本Python Shell导入
- 19. Unix shell脚本 - rpadding输入文件
- 20. 的Linux shell脚本输入线
- 21. 从shell输入一个python脚本?
- 22. Unix Shell脚本 - 将$输入文件
- 23. 蓝输入屏幕(Shell脚本)
- 24. 需要在NCFTP shell脚本上输入
- 25. 在Unix Shell脚本中排序输入
- 26. 如何控制Shell脚本的输入?
- 27. 如何在bash shell脚本中将多行输入读入数组
- 28. BASH中的基本Shell脚本
- 29. 在bash脚本中连接输入
- 30. 竹bash脚本接受输入
为了第十个问题的作者的利益,这被称为'这里文件',以防万一你想查找它。 – IRBMe 2009-07-21 17:23:20