Is there a way to avoid this message in a command like the following?
tac myfile | sed '/abc/q'
I understand why the message occurs: sed exits when it finds 'abc' and tac has no where else to send its data. But I would like a way to tell Bash "it's OK, I expect this to happen."
Disabling SIGPIPE should do it:
trap -- '' PIPE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With