NAME
appexec - execute a command under a specified environment
VERSION
version 1.05
SYNOPSIS
appexec --env environment [options] program [program arguments]
appexec [options] environment program [program arguments]
DESCRIPTION
appexec will execute a program with the specified arguments in the specified environment. The environment is generated by App::Env, so an appropriate App::Env application module must exist.
OPTIONS AND ARGUMENTS
appexec uses long options. Options may be abbreviated, and the "=" character shown below in the option templates may be replaced by whitespace.
The environment to use may be specified either via the --env option, or as the first non-option argument.
The following options are available:
--clear|-c-
Clear out the environment prior to loading the specified ones. This is equivalent to deleting all environment variables except for
HOME SHELL LOGNAME --env=name-
A comma separated list of environments (or applications in App::Env terminology) in which to run the program. The Perl modules defining the environments (e.g. App::Env::<environment name> ) must exist.
If this option is not specified, the first non-option argument should contain the environment name(s).
--appoptskey=value |-okey=value-
Specify a option key and value to be passed via AppOpts to the App::Env application module. This option may be specified multiple times.
If multiple environments will be loaded, then each key must be prefixed with an environment name followed by a colon, e.g.:
appexec --env env1,env2 -o env1:opt1=val1 -o env2:opt2=val2 --site=site-
Specify a site. (See App::Env for more information.)
--define|-Dvariable=value-
Specify an environment variable to be added to the application environment. This option may be repeated.
--delete|-Xvariable-
Specify an environment variable to be removed from the application environment. This option may be repeated.
--dumpenv=format | -d format-
Output the environmental variables to the standard output stream with the specified format. To specify a subset of the variables to output, use "--dumpvar".
The possible formats are:
auto-
Guess the current shell using Shell::Guess and output commands to set the environment
bashcshkshtcsh-
Output commands to set the environment appropriate to the specified shell.
raw-
Output
key=valuewherevaluehas shell metacharacters and spaces escaped unquoted-
Output
key=value. values-
Output only the values one per line. Only eally useful with --dumpvar.
json-
Output the values as
JSON.
--dumpvar|-Vvariable-
Specify an environment variable to dump if "--dumpenv" is specified. May be repeated. If not specified, all environment variables are dumped.
--verbose-
Print the command to be run to the standard output stream before running it.
--help-
Print a short help summary and exit.
--usage-
Print full documentation and exit.
EXAMPLES
Real-life examples:
Run the fhelp tool from the HEADAS FTOOLS application suite:
appexec HEADAS fhelp fparkeyRun the dmlist tool from the CIAO version 3.4 application suite:
appexec -o version=3.4 CIAO dmlist
SUPPORT
Bugs
Please report any bugs or feature requests to bug-app-env@rt.cpan.org or through the web interface at: https://rt.cpan.org/Public/Dist/Display.html?Name=App-Env
Source
Source is available at
https://gitlab.com/djerius/app-env
and may be cloned from
https://gitlab.com/djerius/app-env.git
SEE ALSO
Please see those modules/websites for more information related to this module.
AUTHOR
Diab Jerius <djerius@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2018 by Smithsonian Astrophysical Observatory.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007