1833341 Members
3674 Online
110051 Solutions
New Discussion

UNIX95

 
Micky1_1
Occasional Contributor

UNIX95

Hi all,

Can someone provide me the information regarding the UNIX95 utiliy.

Thanks,

Micky1
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: UNIX95

Shalom,

You set UNIX95=1 and you get some enhanced output from the ps command.

Example:

export UNIX95=1

CL="ps -a -o pid,sz,vsz,args -C $FILTER | sort -nr -k 2,3| head -$NUM"



Don't set it universally, it will prevent you from unsharing HP depot software and patches.


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: UNIX95

Hi:

This is not a utility but rather an environmental option (variable) that controls how certain commands function. You will find that the manpages refer to it as "XPG4" also. In the case of 'ps' setting UNIX95 behavior allows custom formatted output. For example:

# UNIX95= ps -o pid,vsz,comm

...would show my process's pid, virtual size, and basename.

The UNIX95 option in the above example is set _only_ for the duration of the command line by writting it as shown --- whitespace trailing the "=" character before the command ('ps').

Do not globally set UNIX95 in your scripts or profiles. While some commands ignore it, others change their behavior in subtle ways. Consult the manpages on a command-by-command basis before using it.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: UNIX95

UNIX95 is not a utility but rather an environment variable. When it is defined it asserts the XPG4 standards (X/Open Portability Guide) behavior in a number of UNIX commands most notably the ps command.
If it ain't broke, I can fix that.