D
D
Dana2018-05-30 14:38:36
ubuntu
Dana, 2018-05-30 14:38:36

How to make parallel execution of scripts?

ls_count=${#id[*]}
  for (( ls=0; ls<ls_count; ls++ ))
  do
  /home/work/skript.sh ${id[ls]}
  done

You need to run the script /home/work/script.sh several times, with different parameters. It is necessary that these scripts work in parallel.
I tried to add the & sign to the end of the line /home/work/skript.sh ${id[ls]}. The scripts work, but when they reach the end and have to complete their work, they hang.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pfg21, 2018-05-30
@pfg21

see skript.sh why it hangs and what it gets stuck on.
debug will not get away :)

S
Saboteur, 2018-05-30
@saboteur_kiev

How is it determined that it hangs?
What is the content of script.sh ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question