0

I have a shell command which needs some user confirmation from stdin like below

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

The last two lines require user input.

Can someone let me know how can I automate the above using Python 2.7 which requires no user input?

2
  • 1
    So, you are trying to remove the safety from a gun? Commented Aug 1, 2018 at 17:31
  • yes. I don't need this for my use case. Commented Aug 1, 2018 at 17:32

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.