我有一个执行另一个程序的bash脚本。该程序提示用户进行其他输入。问题是,如何从bash脚本自动执行该输入?
例如,s3cmd从我的脚本运行命令会提示我:
Enter new values or accept defaults in brackets with Enter.
Refer to user manual for detailed description of all options.
Access key and Secret key are your identifiers for Amazon S3
Access Key: _
Run Code Online (Sandbox Code Playgroud)
在我的shell脚本中,我将如何为访问密钥提示插入字符串,然后模拟“输入”密钥?
编辑:为清楚起见