5/31/2023 0 Comments Expect spawn serial portYou do this by creating an “expect” script that watches for prompts in the main script and sends the appropriate response for each one. The expect command lets you manage the two ends of the conversation between your set of prepared answers and the program or script that you’ll be sending them to. On Manjaro we use pacman: sudo pacman -Sy expect On Fedora, the command you need is: sudo dnf install expect ![]() The package wasn’t bundled with these distributions, so it had to be installed. We tested expect on Ubuntu, Fedora, and Manjaro. RELATED: How to Use the yes Command on Linux Installing the expect Command For that situation, we need to use expect. ![]() The yes command can’t cope if it needs to provide more than one type of response. Perhaps you need to send an “r” for reinstall to an “ install/upgrade/reinstall ” prompt.
0 Comments
Leave a Reply. |