我有一个shell命令,需要从stdin进行如下的用户确认
support@vrni-platform:/tmp$ patronictl -c /etc/patroni/patroni.yml remove arkin
+---------+--------+------+------+-------+-----------+
| Cluster | Member | Host | Role | State | Lag in MB |
+---------+--------+------+------+-------+-----------+
+---------+--------+------+------+-------+-----------+
Please confirm the cluster name to remove: arkin
You are about to remove all information in DCS for arkin, please type: "Yes I am aware": Yes I am aware
最后两行需要用户输入。
有人可以让我知道如何使用不需要用户输入的Python 2.7自动执行上述操作吗?