I need to play the output of it in a file instead of playing in the standard output that is the screen but without having to explicit with the command >>
in the terminal, I want the script itself to do this.
I need to play the output of it in a file instead of playing in the standard output that is the screen but without having to explicit with the command >>
in the terminal, I want the script itself to do this.
Do as follows:
{
#seus comandos bash aqui
} > output.txt 2>&1
NOTE: If you do not specify the output path, the file will be generated in the directory where the bash script is located.