setenv man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

setenv(3C)							    setenv(3C)

NAME
       setenv(), unsetenv() - add, update or remove an environment variable

SYNOPSIS

   Parameters
	      envname	Points	to a string containing the name of an environ‐
			ment variable to be added or altered.  This should not
			be  a  NULL  pointer  or  null	string, and the string
			should not contain an equal character.

	      envval	Points to a string containing the value to be set  for
			the variable envname.

	      overwrite Indicates  whether  to	overwrite the value of envname
			variable or not, if it already exists.	Expected  val‐
			ues  are  non-zero and zero.  If the environment vari‐
			able does not exist in the environment, then the value
			of this variable is ignored.

DESCRIPTION
       and functions update the environment of the calling process.

       If  envname does not exist, the function ignores the value of overwrite
       and adds the variable envname to the environment with the value envval.
       If  envname exists and overwrite is non-zero, then the variable envname
       is updated with the new value envval.  If envname exists and  overwrite
       is  zero, then the variable is not updated, and the function is consid‐
       ered to have completed successfully.

       The function deletes the variable envname from the environment,	if  it
       exists.	If the envname variable does not exist in the current environ‐
       ment, the environment is unchanged, and the function is	considered  to
       have completed successfully.

       If the application modifies environ or the pointers to which it points,
       the behavior of and is undefined.

EXTERNAL INFLUENCES
   Locale
       The category determines the interpretation of characters in  string  as
       single- and/or multi-byte characters.

   International Code Set Support
       Single- and multi-byte character code sets are supported.

RETURN VALUE
       The and functions return zero on success; otherwise they return and set
       to indicate the error.

ERRORS
       If the function fails, is set to one of the following values:

	      Sufficient memory is not available to  add  a  variable  or  its
	      value to
			     the environment.

	      The	     envname  argument is a null pointer, points to an
			     empty string, or points to a string containing an
			     equal character.

       If the function fails, is set to the following value:

	      The	     envname  argument is a null pointer, points to an
			     empty string, or points to a string containing an
			     equal character.

EXAMPLES
       The following code adds a new environment variable to the current envi‐
       ronment.

       The following code updates the variable

       The following code removes the variable from the current environment.

WARNINGS
       The and functions manipulate the environment pointed to by environ, and
       can  be	used  in conjunction with However, envp (the third argument to
       main) is not changed.

       The uses to enlarge the environment (see malloc(3C)).

       After the or function is called, environment variables may  not	be  in
       alphabetical order.

AUTHOR
       and were developed by HP.

SEE ALSO
       exec(2),	    getenv(3C),	    malloc(3C),	    putenv(3C),	   environ(5),
       thread_safety(5).

STANDARDS CONFORMANCE
								    setenv(3C)
[top]

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net