(echo hello; exit 1)| sed s_hello_h_ ; [ ${PIPESTATUS[0]} = 0 ]
Permet de récupérer le code de retour d'une commande avant pipe au lieu du code de retour de la dernière commande.
Fonctionne en bash uniquement
Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1681"></script>
0 comment about "Forward exit status after pipe"