I have developed an application in C that is a command line. The app has special keywords to output information. Currently I need to run a command to log into my application, than run a command to get an output, and finally exit the application.
Is there a way to combine my 3 lines into one? For Example, login, enter command, and exit sequentially? As you can see in the example below, if I can do this all in one line I wouldn't need to manually input every step.
./application -login [email protected]
> getstats
> exit
./application -login [email protected]
> getstats
> exit
etc...
What I want is something like...
./application -login [email protected] && getstats && exit
Of course && is not what I'm looking for as it runs each command one at a time until. getstats and exit don't get run inside the .application but rather after I exit out of it...
Any tips would be great.
./application -login [email protected]; sleep 5 && echo "getstats" &; sleep 10 && echo "exit" &;