I have an application that runs as a process on an ubuntu server. This application has a gui command line that allows me to enter a command, then press enter and the command starts. I can script to determine the process id. Then I script should send the following command:
# echo "command" > /proc/<PROCESSID>/fd/0
I tried the options
# echo "command" > /proc/<PROCESSID>/fd/0
# echo -e "command\r" > /proc/<PROCESSID>/fd/0
# echo -e "command\c" > /proc/<PROCESSID>/fd/0
# echo -e "\015" > /proc/<PROCESSID>/fd/0
I know that the program receives the command, but does not execute it. I suspect that this is because I do not physically press the enter button, and perhaps on the command line it expects. Can someone advise me how I use this wrong or best option?
source
share