So, I have a Linux program that works after a while (true), which waits for user input, processes it and displays the result on stdout.
I want to write a shell script that opens this program, feed the lines from the txt file, one line at a time and save the program output for each line to a file.
So, I want to know if there is any command for:
- open a program
- send text to a process
- get output from this program
Many thanks.
source
share