Take a look on the following
# more /tmp/myscript
#!/bin/bash
echo I AM
echo BIG GUY
echo AND ALSO SMART
# bash /tmp/myscript | tee -a >/tmp/log
why we not get the output from echo in the script to the console?
actually output redirect to the log - /tmp/log but not also to the standard output
its very strange because tee -a should redirect top log and also to stand art output
what is the right way to write to log and print to console ?
expected output
# bash /tmp/myscript | tee -a >/tmp/log
I AM
BIG GUY
AND ALSO SMART