bash: redirect stdout and stder to _different_ variables
am 30.10.2007 20:59:44 von Nathan CollinsIs it possible to redirect stdout and stderr to different variables in
bash? I do things like
error_file=$(mktemp)
out=$(
err=$(< error_file)
rm $error_file
to get stdout in out and stderr in err when running
like to avoid the temp file if possible.
Thanks,
-nathan