#!/bin/bash
# exemple de caroussel
maxTime=5
player () {
    echo -n "${BASHPID} " > pipe
    sleep 1
    for  (( i=0 ; i - ${maxTime} ; i++ ))
    do
	echo -n "$1"
    done
}

mkfifo pipe
( player "Universite ")&
( player "de ")&
( player "Bretagne-")&
( player "Sud
")&

sleep 1
read pids < pipe
rm pipe

wait ${pids}
