Hi everyone, this is probably very simple, but i haven't found anything in the forum, or maybe im just taking the wrong aproach...
I made a script to check a bunch of stuff, this script currently outputs it's findings to the screen, i need to log that output too, i was thinking to just make a new echo command to receive the standard output, and duplicating it, one for the screen, one to a file. well, like this
$checkCommand | doubleEcho
where doubleEcho would have something like this.
echo $1
echo $1 >> check.log
of course, that doesnt work, not that i ever tought it would... how can i catch the output of the checkCommand to use it in my script, is there another variable i can use for that?, or any other way to acomplish this?
the other option would be to just output everything into a file in the fist place and then just output the file... but there has to be a better way... i think.. hehe
thanks for your time.