If you are on bash you can use pipestatus to check the return code of each command
Regards,
Irwing
Attachments
Library
Quick Reference
Archives
Sample Index
2015 Indexes