|
From: | Paul Eggert |
Subject: | bug#22195: deviation from POSIX in tee |
Date: | Thu, 17 Dec 2015 19:22:01 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
Eric Renouf wrote:
If a write to any successfully opened file operand fails
But the write didn't fail here. Instead, a signal was sent to 'tee'. If you don't want the signal, trap it. E.g.:
trap '' PIPE for i in {1..300}; do echo "$i" echo "$i" >&2 sleep 1 done | tee >(head -1 > h.txt; echo "Head done") \ >(tail -1 > t.txt) >/dev/null will give the behavior you want. So there is no deviation from POSIX here.
[Prev in Thread] | Current Thread | [Next in Thread] |