#!/bin/bash
# exemple de RDV
mkfifo pipe
(
    echo -n "${BASHPID} " > pipe
    sleep 1
    echo "avant RDV (A)"
    #RDV
    echo "apres RDV (A)"
)&
(
    echo -n "${BASHPID} " > pipe
    sleep 1
    echo "avant RDV (B)"
    #RDV
    echo "apres RDV (B)"
)&

sleep 1
read pids < pipe
rm pipe

wait ${pids}
