If I use 2 system commands in a script, will one finish before the next one starts? or will it start the first and the second at the same time?
i.e.
system("ps | grep rminer");
system("ls -al | grep 431");
If I use 2 system commands in a script, will one finish before the next one starts? or will it start the first and the second at the same time?
i.e.
system("ps | grep rminer");
system("ls -al | grep 431");
In general, It should run one command, wait for it to complete, before executing the other.
Of course, it will not if the command is launched in the background, with "&" or if the program itself is configured to automatically put itself in background mode, such as gvim.
From the manpage for "system":