Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mesg(1)

who(1)

mail(1)

talk(1)

WRITE(1)  —  USER COMMANDS

NAME

write − write to another user

SYNOPSIS

write user [ ttyname ]

DESCRIPTION

Write copies lines from your standard input to user’s screen.

When you type a write command, the person you’re writing to sees a message like this:

Message from hostname!yourname on yourttyname at hh:mm . . . 

After typing the write command, enter the text of your message.  What you type appears line-by-line on the other user’s screen.  Conclude by typing an end of file indication (^D) or an interrupt.  At this point write displays ‘EOT’ on your recipient’s screen and exits. 

To write to a user who is logged in more than once, use the ttyname argument to indicate the appropriate terminal name. 

You can grant or deny other users permission to write to you by using the mesg command (default allows writing).  Certain commands, nroff and pr(1) in particular, don’t allow anyone to write to you while you are using them in order to prevent messy output.

If write finds the character ‘!’ at the beginning of a line, it calls the shell to execute the rest of the line as a command. 

Two people can carry on a conversation by write’ing to each other.  When the other person receives the message indicating you are writing to him, he can then write back to you if he wishes.  However, since you are now simultaneously typing and receiving messages, you end up with garbage on your screen unless you work out some sort of scheduling scheme with your partner.  You might try the following conventional protocol:  when you first write to another user, wait for him to write back before starting to send.  Each person should end each message with a distinctive signal — -o- (for ‘over’) is standard — so that the other knows when to begin a reply.  To end your conversation, type -oo- (for ‘over and out’) before finishing the conversation. 

EXAMPLE

Here is an example of a short dialog between two people on different terminals.  Two users called Horace and Eudora are logged in on a system called jones.  To illustrate the process, both users’ screens are shown side-by-side:

Eudora’s TerminalHorace’s Terminal
Horace is staring at his screen
jones%  write  horaceMessage from jones!eudora on tty09 at 17:05 ...
how about a squash game tonight? -o-how about a squash game tonight? -o-
jones%  write  eudora
I’m playing tiddlywinks with Carmeline -o-
Message from jones!horace on tty03 at 17:06 ...
I’m playing tiddlywinks with Carmeline -o-
How about the beach on Sunday? -o-How about the beach on Sunday? -o-
Sorry, I’m washing my tent that day -o-
Sorry, I’m washing my tent that day -o-
See you when I get back from Peru -oo-See you when I get back from Peru -oo-
^D
jones%EOF
I hear rack of llama is very tasty -oo-
^D
I hear rack of llama is very tasty -oo-
EOFjones%

FILES

/etc/utmpto find user
/bin/shto execute ‘!’

SEE ALSO

mesg(1), who(1), mail(1), talk(1)

Sun Release 3.2  —  Last change: 7 March 1984

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026