#143·script

How do I automate inputs to interactive programs?

Author: danielportoCreated Nov 28, 2022Updated Jun 30, 2023

Every so often, I need to automate tasks that need to provide answers to interactive programs For instance, to simulate user's sessions or just because the program does not provide a non-interactive interface. Normally, I use "expect" for that (ex: https://phoenixnap.com/kb/linux-expect)

How can the same feature be implemented with go script? Thanks