#!/bin/bash # bash -x -c '(eval "echo foo >&2") 2>stderr' # echo "beenthere" >&2 2>stderr ; cat stderr echo & >&2 2>stderr cat stderr exit