KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have this bash shell-script command that causes date to run if make succeeds (terminates with zero exit status) and vice versa: make && date but now I want to process its output e.g. make | sed s/a/A/ If I do make | sed s/a/A/ && date date runs even when make fails. If I instead do make && date | sed s/a/A/ the sed processes date 's output instead of make 's. Would you know of any solution? Thanks! P.S. I've tried these: (make | sed s/a/A/) && date date still runs when make fails. (make && (date > /dev/null)) | sed s/a/A/ date doesn't run when make succeeds.
Tags (comma-separated)
Save Edits
Cancel