使用expect来自动应答shell的交互

#!/usr/bin/expect
spawn openssl req -new -key server.key -out server1.csr
expect "Country Name"
send "\n"
expect "State or Province Name"
send "\n"
interact 

相关文章:

  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2021-09-28
猜你喜欢
  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
  • 2021-08-31
  • 2021-12-17
  • 2022-12-23
  • 2021-11-06
相关资源
相似解决方案