Tim Woodall <debianu...@woodall.me.uk> writes: > However on trying to debug something else, I wanted to run it like this: > > ./script |& tee log > > and now it doesn't clean up if I <ctrl c> it.
Just a point here about tee since I didn't see anyone else mention it. tee has had the -i option to ignore interrupt signals for ages. The non-obvious side effect is INT signals pass up the pipe, in your case to bash running your script.