4623 shaares
397 liens privés
397 liens privés
et j'ajoute:
"""
If you are using zsh, they array is called pipestatus (case matters!) and the array indices start at one:
$ false | true
$ echo "${pipestatus[1]} ${pipestatus[2]}"
1 0
"""
source: http://unix.stackexchange.com/questions/14270/get-exit-status-of-process-thats-piped-to-another