Shell scripting looks weird.
#linux
function ctee () {
local OUTF="$1"
shift 1
if [ -z "$OUTF" ]; then
echo "Usage: ctee OUTF" >&2
return 1
fi
tee "$@" >(nice -n20 xz > "$OUTF")
}
#linux
dieter_wilhelm likes this.