tee command reads the standard input and writes it to both the standard output and one or more files:

$ more file
file: No such file or directory

$ echo message | tee file
message

$ more file
message