Bash: how to write a wrapper script?
I want to write a bash wrapper script, that:
1. Starts a program
2. Listens to my keystrokes
3. Sends specific commands to the standard input of the program started by the script when I strike a key
An example: when I hit letter "q", the script should catch it, and send command "quit" to the standard input of the program started by the script.
In other words (I am not very experienced in programming, but I hope I use the correct terminology):
1. I want to detach the script's child process from the terminal, so that the parent (the script) could receive terminal input; meanwhile
2. the parent should open a pipe to the standard input of the child process, so that it could send data to the child process.
Is this possible in bash?
Last edited by J_Szucs; 01-29-2005 at 08:27 PM.