1
I am creating a script and need the outputs to be shown in the terminal, but also saved in a file
#!/bin/bash
echo "Olá Mundo"
and I am redirecting the output to the file as follows
./teste.sh > saida.txt
so the string Ola mundo
is correctly saved in the file.
How do I make that in addition to the file it is also printed on the screen at the same time?
Congratulations on the answer.
– Vivi Santana
@Vivisantana thanks,
– FourZeroFive
It worked here. I was trying something with
./test.sh > saida.txt 2>&0 2>&1
unsuccessful.– Wilker