Hi all,
I have a program running on my gentoo system that controls a USB servosystem, however, it is a command line program that requires user input. I wish to use this program in the start up script of the computer so I was thinking there might be a way to emulate keystrokes to that program to fake a user input to the program and then exit. For example, to turn on the servosystem, you have to type (bold face represents user input)
gentoo-machine root# ./aducmd 0
Enter Command <pipe> <w|r|s> [Command] 1 w sk0
Enter Command <pipe> <w|r|s> [Command] <Enter>
gentoo-machine root#
I thought of calling the program like this: echo -e "1 w sk0 \n \n" | ./aducmd 0 but that did not work, does any body know how to make a script or a command to fake user input? (or how to create one?)
Thanks,
Neked