Fonction wait dans un script
bonjour,
j'aurai besoin d'un coup de main pour la création d'un script. Ce script doit créer un fichier une fois que certaines opérations à l'intérieur de celui-ci sont terminé.
Je pensais utilisé les fonctions &, $!, et wait
Voici comment je compte m'y prendre. Pouvez-vous me dire si la manière est bonne ?
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| #!/bin/ksh
/home/oracle/sauvegarde1.ksh &
proc_id1=$!
/home/oracle/sauvegarde2.ksh &
proc_id2=$!
/home/oracle/sauvegarde3.ksh &
proc_id3=$!
/home/oracle/sauvegarde4.ksh &
proc_id4=$!
wait proc_id1 proc_id2 proc_id3 proc_id4
> /save/ok.svg |
Merci pour votre aide