Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home
HP Tru64 UNIX and TruCluster Server Version 5.1B-4: Patch Summary and Release Notes > Chapter 1 Enhancements, Improvements, and Features

Commands Modified to Conform to POSIX Standard

» 

»Table of Contents
Content starts here

The following Tru64 UNIX commands have been modified to conform to the POSIX standard. For most of theses commands, the modified action is initiated by using a new environment variable, STDS_FLAG.

  • awk

  • cp

  • ex

  • chmod

  • edit

  • find

  • rm

  • uucp

  • uudecode

  • vi

The following sections describe the changes to these commands.

Changes to ex, edit, and vi

The ex, edit, and vi (vedit/view) commands have been modified so the POSIX compliant shell, /usr/bin/posix/sh, is the default shell when the SHELL environment variable is not set or is set to NULL.

Prior to this fix, vi, ex did not have a command line interpreter when the SHELL environment variable was set to NULL. .

Setting STDS_FLAG to ALL produces the following POSIX compliant behavior:

If C or S is entered in command mode and more than part of a single line is affected, then vi saves the affected text in numeric buffers.

Changes to awk and nawk

The awk and nawk commands have been modified to interpret numbers and the equal sign (=) as text strings when specified as arguments to “program text.

To produce this POSIX compliant action, set the new STDS_FLAG to ALL:

STDS_FLAG=ALL

When STDS_FLAG is set to ALL, variable names that do not begin with the alphabetic character or underscore are considered invalid.

If STDS_FLAG is not set or is set to NULL, awk interprets this use of numbers and the equal sign as numeric strings when specified as arguments to “program text.” This was the default action before these commands were modified.

Changes to chmod

The chmod command has been modified to force it to consider the umask when the who(ugoa) argument is not specified.

To produce this POSIX compliant-action, set the new STDS_FLAG to ALL:

STDS_FLAG=ALL

If STDS_FLAG is not set or is set to NULL, chmod does not consider the umask value while changing to the permissions specified. This was the default action before chmod was modified.

Changes to cp

The cp command has been modified to enable compliance to the following POSIX requirements:

  • When the -i and -f options are used together the -f should not disable a previous -i (that is, turn off prompting).

  • When the -f is set and the target file cannot be opened for writing, cp unlinks the target file.

To produce this POSIX-compliant action, set the new STDS_FLAG to ALL:

STDS_FLAG=ALL

If STDS_FLAG is not set or is set to NULL, when the -i and -f options are used together the one specified last takes effect. This was the default action before cp was modified.

Changes to ex

The ex command has been modified to return 1 as an exit status when a read-only option with write fails.

To produce this POSIX-compliant action, set the new STDS_FLAG to ALL:

STDS_FLAG=ALL

If STDS_FLAG is not set or is set to NULL, ex will return 0 as an exist status when a read-only option with write fails. This was the default action before ex was modified.

Changes to find

The find command has been modified to not treat a hyphen (--) as special if it is first argument. Instead, it ignores the hyphen and lists the file containing the hyphen.

To produce this POSIX-compliant action, set the new STDS_FLAG to ALL:

STDS_FLAG=ALL

If STDS_FLAG is not set or is set to NULL, find will treat the first hyphen as special and exit with an error. This was the default action before find was modified.

Changes to rm

The rm command has been modified to handle an excessive depth of files. Even if the pathname is longer than PATH_MAX by multiple times, rm will delete the directory with all its subdirectories and exit with value 0.

To produce this POSIX-compliant action, set the new STDS_FLAG to ALL:

STDS_FLAG=ALL

When STDS_FLAG is not set or set to NULL, rm will not delete files when the pathname exceeds PATH_MAX value. This was the default action before rm was modified.

Changes to uucp

The uucp command has been modified so it can create a regular file when a directory with the same name already exists.

To produce this POSIX-compliant action, set the new STDS_FLAG to ALL:

STDS_FLAG=ALL

If STDS_FLAG is not set or is set to NULL, when uucp, attempts to create a regular file with the same name as an existing directory, the attempt fails and the file attributes are not changed. This was the default action before uucp was modified.

Changes to uudecode

The uudecode command has been enhanced to recognize symbolic file mode.

For example, consider a case in which an editor was used to modify the first line of a source file of an encoded file from this:

begin 744 example.en

to this:

begin u=rwx,go=r example.en

The modified uudecode command would recognize the symbolic mode and create the file example.en.

To produce this POSIX-compliant action, set the new STDS_FLAG to ALL:

STDS_FLAG=ALL

If STDS_FLAG is not set or is set to NULL, when uudecode, will recognize only absolute file mode. This was the default action before uudecode was modified.

Printable version
Privacy statement Using this site means you accept its terms
© 2006 Hewlett-Packard Development Company, L.P.