I have the following shell script that executes multiple jar files from a folder. The script is working fine but I want the for loop to WAIT until a .jar file execution is complete before starting the execution of the next .jar file in the loop. Below is the code:
#!/bin/bash
for i in "/abc/pqr/"*
do
"$i" &
done
wait