notify-send with stderr in notification body if there is stderr
2
votes
1
answer
490
views
Suppose I have a command like:
foo() {
echo a
echo b >&2
echo c
echo d >&2
}
I use the following command to process stdout in terminal but send error via notify-send
foo 1> >(cat) 2> >(ifne notify-send "Error")
The issue i am having is, I want to view the stderr (in this case
b d
) as notify-send body.
I have tried:
foo 1> >(cat) 2> >(ifne notify-send "Error" "$(cat)")
foo 1> >(cat) 2> >(ifne notify-send "Error" "$(
Asked by Ahmad Ismail
(2998 rep)
Aug 11, 2022, 07:37 AM
Last activity: Aug 11, 2022, 09:27 AM
Last activity: Aug 11, 2022, 09:27 AM