command can be used to read from standard input and write to standard output and files. So, I can, for example, do the following:
How can I modify the code so that the output is appended to the file (not overwritten)?
(date; users; uptime;)| tee mylog.txt
Please notice that I want the output to both the STDOUT and the file.
Thanks in advance.