I execute several labor-intensive executables with different parameters assigned in a loop as background jobs in parallel. Here is an example of a toy and its result:
bash-3.2$ set -o notify
bash-3.2$ for (( i=0 ; i < 4 ; i+=2 )); do
> sleep ${i} &
> done
[1] 32394
[2] 32395
bash-3.2$ [1]- Done sleep ${i}
[2]+ Done sleep ${i}
Please note that when each task is completed, it will notify me. The job command will be shown in the final message, but so that the parameter is not expanded, so there is no obvious way to find out what parameter value it uses when viewing the message. Hope the post looks like
bash-3.2$ [1]- Done sleep 0
[2]+ Done sleep 2
Can this be done?
Thank you and welcome!
source
share