$alloutput=`cmd 2>&1`; # This should capture both stdout and stderr.