blob: 84f573564325cc18fd8be9487c9386abbbd1e4f3 [file] [log] [blame]
type=page
status=published
title=export
next=export-http-lb-config.html
prev=enable-secure-admin-principal.html
~~~~~~
= export
[[export-1]][[GSRFM00132]][[export]]
== export
Marks a variable name for automatic export to the environment of
subsequent commands in multimode
[[sthref1151]]
=== Synopsis
[source]
----
asadmin [asadmin-options] export [--help]
[variable-name=value [variable-name=value]*]
----
[[sthref1152]]
=== Description
In multimode, the `export` subcommand marks an environment variable for
automatic export to the environment of subsequent commands. All
subsequent commands use the variable name value as specified unless you
exit multimode, or use the `unset` subcommand to unset the variable. If
only the variable name is specified, the current value of that variable
name is displayed.
If the `export` subcommand is used without any arguments, a list of all
the exported variables and their values is displayed. Exported shell
environment variables set prior to invoking the `asadmin` utility are
imported automatically and set as exported variables within `asadmin`.
Environment variables that are not exported cannot be read by the
`asadmin` utility.
This subcommand is supported in local mode only.
[[sthref1153]]
=== Options
asadmin-options::
Options for the `asadmin` utility. For information about these
options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] help page.
`--help`::
`-?`::
Displays the help text for the subcommand.
[[sthref1154]]
=== Operands
variable-name=value::
Variable name and value for automatic export to the environment to be
used by subsequent commands.
[[sthref1155]]
=== Examples
[[GSRFM609]][[sthref1156]]
==== Example 1   Listing the Environment Variables That Are Set
This example lists the environment variables that have been set.
[source]
----
asadmin> export
AS_ADMIN_USER = admin
AS_ADMIN_HOST = bluestar
AS_ADMIN_PREFIX = server1.jms-service
AS_ADMIN_PORT = 8000
Command export executed successfully
----
[[GSRFM610]][[sthref1157]]
==== Example 2   Setting an Environment Variable
This example sets the `AS_ADMIN_HOST` environment variable to `bluestar`.
[source]
----
asadmin> export AS_ADMIN_HOST=bluestar
Command export executed successfully
----
[[GSRFM611]][[sthref1158]]
==== Example 3   Setting Multiple Environment Variables
This example sets a number of environment variables for the multimode environment.
[source]
----
asadmin> export AS_ADMIN_HOST=bluestar AS_ADMIN_PORT=8000
AS_ADMIN_USER=admin AS_ADMIN_PREFIX=server1.jms-service
Command export executed successfully
----
[[sthref1159]]
=== Exit Status
0::
subcommand executed successfully
1::
error in executing the subcommand
[[sthref1160]]
=== See Also
link:asadmin.html#asadmin-1m[`asadmin`(1M)]
link:multimode.html#multimode-1[`multimode`(1)],
link:unset.html#unset-1[`unset`(1)]