ex(1)

ex(1)

LC_COLLATE determines the collating sequence used in evaluating regular expressions and in processing the tags ®le. If it is not speci®ed or is null, it defaults to the value of LANG.

LC_CTYPE determines the interpretation of text as single and/or multibyte characters, the classi®cation of characters as uppercase or lowercase letters, the shifting of the case of letters, and the characters matched by character class expressions in regular expressions. If it is not speci®ed or is null, it defaults to the value of LANG.

LANG determines the language in which messages are displayed. If it is not speci®ed or is null, it defaults to "C" (see lang(5)).

LC_ALL determines the locale to be used to override any values for locale categories speci®ed by the setting of LANG or any environment variable (beginning with LC_ ).

LC_MESSAGES determines the processing of af®rmative responses and the language in which messages should be written.

If any internationalization variable contains an invalid setting, all internationalization variables default to "C" (see environ(5)).

When set, the TMPDIR environment variable speci®es a directory to be used for temporary ®les, overriding the default directory /var/tmp.

International Code Set Support

Single- and multibyte character code sets are supported.

ASYNCHRONOUS EVENTS (XPG4 Only)

The following actions shall be taken upon receipt of signals:

SIGINT

When an interrupt occurs, ex shall alert the terminal and write a message. The current editor command shall be aborted, and ex shall return to the command level and prompt for another command. If the standard input is not a terminal device, ex shall exit at the interrupt and return a nonzero exit status.

SIGCONT

The screen shall be refreshed.

SHIGHUP

If the current buffer has changed since the last e or w command, ex shall attempt to save the current ®le in a state such that it can be recovered later by an ex -rcommand.

The action taken for all other signals is unspeci®ed.

EXTENDED DESCRIPTION (XPG4 Only)

The pathname of the ®le being edited by ex is referred to as the current ®le. The text of the ®le shall be read into a working version of the ®le (called buffer in this clause), and all editing changes shall be performed on that version; the changes shall have no effect on the original ®le until an ex command causes the ®le to be written out. Lines in the buffer may be limited to { LINE_MAX } bytes, and an error message may be written if the limit is exceeded during editing.

The alternate pathname is the name of the last ®le mentioned in an editor command, or the previous current pathname if the last ®le mentioned became the current ®le. When the % appears in a pathname entered as part of a command argument, it shall be replaced by the altername pathname. Any character, including % and # shall retain its literal value when preceded by a backslash.

When an error occurs, ex shall alert ther terminal and write a message.

If the system crashes, ex shall attempt to preserve the buffer if any unwritten changes were made. The command-line option -rcan be used to retrieve the saved changes.

During initialization (before the ®rst ®le is read or any user commands from the terminal are processed), if the environment variable EXINIT is set, the editor shall execute ex commands contained in that vari- able. If the variable is not set, ex shall attempt to read commands from the $HOME/.exrc . If and only if EXINIT or $HOME/.exrc sets the editor option exrc, ex ®nally shall attempt to read commands from a ®le .exrc in the current directory. In the event that EXINIT is not set and the current directory is the home directory of the user, any .exrc ®le shall only be processed once. No .exrc shall be read unless it is owned by the same user ID as the effective user ID of the process. After any .exrc ®les are processed, any commands speci®ed by the -coption shall be processed.

HP-UX Release 11i: December 2000

− 17 −

Section 1257

e