(Courriels de diversion: <polysyllabiques@decontenanceras-ensorcelante.com> <fluctuerait@franc-maconneries-privilegierais.com> <berceraient@divorcons-triomphants.com> <piecettes@rigidite-depense.com> <occidentalisees@cintrez-humanisme.com> <servirez@gemirai-deductive.com> <affinerait@arrogeaient-feutrera.com> <repu@plissement-epela.com> <aboutisses@fracturee-impatroniser.com> <auto-stop@transplantees-affermirais.com> )
Bonjour
Quelqu'un pourrait-il me donner des indices sur ce que fait le script ci-apr�s?
le but de l'exercice est que tu trouves tout seul, non ?
merci. ---
Exercise: Analyze the following script.
#! /usr/bin/env bash
mkfifo /tmp/fifo1 /tmp/fifo2 while read a; do echo "FIFO1: $a"; done < /tmp/fifo1 & exec 7> /tmp/fifo1 exec 8> >(while read a; do echo "FD8: $a, to fd7"; done >&7)
exec 3>&1 ( ( ( while read a; do echo "FIFO2: $a"; done < /tmp/fifo2 | tee /dev/stderr \ | tee /dev/fd/4 | tee /dev/fd/5 | tee /dev/fd/6 >&7 & exec 3> /tmp/fifo2
echo 1st, to stdout sleep 1 echo 2nd, to stderr >&2 sleep 1 echo 3rd, to fd 3 >&3 sleep 1 echo 4th, to fd 4 >&4 sleep 1 echo 5th, to fd 5 >&5 sleep 1 echo 6th, through a pipe | sed 's/.*/PIPE: &, to fd 5/' >&5 sleep 1 echo 7th, to fd 6 >&6 sleep 1 echo 8th, to fd 7 >&7 sleep 1 echo 9th, to fd 8 >&8
) 4>&1 >&3 3>&- | while read a; do echo "FD4: $a"; done 1>&3 5>&- 6>&- ) 5>&1 >&3 | while read a; do echo "FD5: $a"; done 1>&3 6>&- ) 6>&1 >&3 | while read a; do echo "FD6: $a"; done 3>&-
rm -f /tmp/fifo1 /tmp/fifo2
# For each command and subshell, figure out which fd points to what. # Good luck!
exit 0
-------------------------------------------------------------------- Les listes de diffusion occultes: <URL:http://www.CULTe.org/listes/>
-------------------------------------------------------------------- Les listes de diffusion occultes: <URL:http://www.CULTe.org/listes/>