mardi 24 mars 2015

Only pipe on Success


Is there a way in the Linux command line, to only have a command pipe its output to another, when the command didn't fail?



$ cmda | cmdb


I would like it, so when cmda returns a status code other than 0, its output doesn't get redirected to cmdb.



Aucun commentaire:

Enregistrer un commentaire