If a certain command (in my case ./karaf) runs a sub-process in a shell, that accepts its own commands, is there someway to execute the subsequently listed commands in a script as commands to the subprocess? For example,
sudo ./karaf
opens a process in the shell that accepts its own commands. If I run this from a shell script, and then want the command
feature:install odl-openflowplugin-flow-services-u
to be run INSIDE the ./karaf program, how do I go about doing this?
Thank you!
You can redirect commands to karaf like:
But I wouldn't recommend you to do that. You see shell will pass the command imidiatelly to karaf which isn't ready to accept those commands (I assume it takes some time for karaf to initialize itself)
Instead you'd better execute command via karaf client.