I have a question regarding shell scripts (the environment is Linux, preferably Ubuntu).
We want to execute a stress test on a RESTFul application. The stress test is composed of two processes. Running them could be something like:
java -jar stress.jar
java -jar stress.jar -someparameter somevalue
The two have to be started at the same time.
The first process should start, run, and return. The second too. By definition the second will return much earlier, and we want it to be repeatedly executed until the first one returns.
I would be very thankfor if somebody can provide me the script (or the basics that I can use) for this to achieve.
EDIT
this did the trick:
#!/bin/bash
commandA & apid=$!;
sleep 10;
while kill -0 $apid; do commandB; done