Is there a way in Linux/Unix bash to turn off output or redirect to a file
I am currently writting a bash script in which I would like to have the ability to run in a silent mode. I come from the windows world and I was hoping there was something like echo ON/echo OFF type command.
Along with this option I would to log everything that was supposed to go to standard out to go to a file. I tried to use the commands "script filename" and "tee filename" but they don't seem to work correctly.
Any help anyone can provide will be greatly appreciated.