How to return from background process and check if it is running or not?

Hi Team,
i am executing 3 scripts in background from 1 script and i want to send a message once the script gets completed.these scripts usually takes 1 hr to complete.

My sample script is below,

Vi abc.sh

sh /opt/data/Split_1.sh &
sh /opt/data/Split_2.sh &
sh /opt/data/Split_3.sh &

So ,Once the Split_1.sh gets complete i want to send a mail that Split_1 completed and the same way for Split_2 and Split_3

Why don't you add the mail command to each of the scripts? Else, create a "group command" with the script and the mail command, and send that to background.

@Rudi:Can you share a sample

Not thoroughly tested, but a starting point:

sh shscr && echo mail_it &
{ sh shscr; echo mail_it; } &