It's supposed to be done by adding 2>&1 to the end of the command, but that doesn't work for certain commands like time.
$1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20} 2>&1
./combine.sh command_to_capture with parameters 2>&1 > outputfile