16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

write<br />

Usage notes<br />

Localization<br />

Exit Values<br />

1. When you issue a write command to send a message to another user, the<br />

other user receives a message of the form:<br />

Message from your_name (terminal) [date] ...<br />

After the system establishes the connection to the other user, it sends two alert<br />

characters (usually beeps) to your terminal to tell you that it is ready to send<br />

your message. You can then type your message, which will appear on the other<br />

user’s terminal. To end your message, enter end-of-file or an interrupt (typically,<br />

for end-of-file or for an interrupt, where EscChar is<br />

normally the cent sign; if you use rlogin or telnet to enter the shell, you hold<br />

down the Ctrl key while you press either D or C). When write receives an<br />

indication for end-of-message, it tells the other user that the message is over<br />

and breaks the connection.<br />

The other user can reply to your message with:<br />

write your_user_name<br />

However, if both of you are trying to write on each other’s terminal at the same<br />

time, the messages may get interleaved on your screens, making them difficult<br />

to read. For two-way conversations, use talk instead of write.<br />

2. You can add the output of a command to the material that you write. To do this,<br />

start a line with an exclamation mark (!) and put a standard system command<br />

on the rest of that line. write calls your shell to execute the command, and<br />

sends the standard output (stdout) from the command to the other user. The<br />

other user does not see the command itself or any input to the command. For<br />

example, you might write:<br />

Here is what my file contains:<br />

!cat file<br />

3. The mesg command lets you refuse write messages. With:<br />

mesg n<br />

you can tell the system that you don’t want to be interrupted by write<br />

messages. If people try to write to you, they are denied immediately; the<br />

system does not inform you about such attempts. For further details, see mesg.<br />

write uses the following localization environment variables:<br />

v LANG<br />

v LC_ALL<br />

v LC_CTYPE<br />

v LC_MESSAGES<br />

v LC_SYNTAX<br />

v NLSPATH<br />

See Appendix F for more information.<br />

0 write successfully wrote a message, or the intended recipient used mesg<br />

to refuse messages (either before you start sending a message or as you<br />

are sending the message).<br />

1 Failure due to any of the following:<br />

v user_name is not signed on<br />

v You do not have permission to write on that user’s terminal<br />

v write cannot open the target terminal for writing<br />

794 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!