I have created a script that compiles and then executes 4 .c programs.
Now, my script is the following:
#!/bin/sh
echo "Compiling first program. . ."
gcc -o first first.c
echo "File compiled."
echo
echo "Compiling second program. . ."
gcc -o second second.c
echo "File compiled."
echo
echo "Compiling third program. . ."
gcc -o third third.c
echo "File compiled."
echo
echo "Compiling fourth program. . ."
gcc -o fourth fourth.c
echo "File compiled."
echo
./first
./second
./third
./fourth
Every executable file needs to run alone. The question is: launching the execs in that way, will they be executed simultaneously? How do I know when a program has terminated before launching the following one?
&) or by usinggnu parallelorxargs -Pand such...