So, this program writes some stuff to a file and some stuff to the terminal
./program input.txt > output.txt
In addition to what it dumps to output.txt, it prints out some stuff to the screan. I tried to direct what it prints in the terminal but I failed:
./program input.txt > output.txt &>>log
But log ends up being empty.
bash
doesn't let you redirect stdout
twice. Instead, redirect stdout and stderr separately:
./program input.txt > output.txt 2> log
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments