Customizing the user environment

WRITE

Use WRITE to display messages on the workstation screen when a user logs in.

WRITE has the following command format:

WRITE "[text][%identifier]" [;][identifier]

Replace text with the words you want to display on the screen.

Replace identifier with a variable you want to display, such as a user's login name. (See ``Using identifier variables'' for a complete list of variables.)

Text you want to display must be enclosed in quotation marks (`` '').

There are several ways to display variables in the text message. The way you enter the variable in the WRITE command determines the display format, as follows:

To join several text strings and identifier variables into a single display without enclosing the variables in quotation marks, use a semicolon between the text and the variables.

If you have several WRITE commands, each one appears on a separate line on your workstation. However, if you put a semicolon at the end of all but the last WRITE command, the commands appear as one continuous sentence or paragraph (although they may wrap onto additional lines on the workstation's screen).

Text strings can include the special characters in the following list:

\r
makes a carriage return occur

\n
starts a new line of the text

\"
displays a quotation mark on the screen

\7
makes a beep sound

In addition to the semicolon, there are other operators you can use to form compound strings (in other words, to join text and identifier variables into one command). These operators are listed in the following list in order of precedence.

* / %
multiply, divide, modulos

+ -
add, subtract

>> <<
shift left or right (1000 >> 3 becomes 1)

For example:


© 1999 The Santa Cruz Operation, Inc. All rights reserved.
UnixWare 7 Release 7.1.1 - 5 November 1999