Sending a file

You can add the output of a command to a message that you are writing. To do this, start a line with an exclamation mark (!) and put a standard shell command on the rest of that line. write calls your shell to execute the command, and sends the standard output (stdout) from the command to the other user. The other user does not see the command itself or any input to the command. For example, you might write:
Here is what my file contains:
!cat file1
The contents of file1 are displayed on the other user's screen.