env(1) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

env(1)

env(1)                           User Commands                          env(1)



NAME
       env - set environment for command invocation

SYNOPSIS
       /usr/bin/env [-]  [-i | --ignore-environment] [name=value]...
            [-0 | --null] [-u name | --unset=name]... [--help]
            [utility [arg... ]]


       /usr/xpg4/bin/env [-]  [-i | --ignore-environment] [name=value]...
            [-0 | --null] [-u name | --unset=name]... [--help]
            [utility [arg... ]]

DESCRIPTION
       The  env utility obtains the current environment, modifies it according
       to its arguments, then invokes the utility named by the utility operand
       with the modified environment.


       Optional  arguments  are  passed  to  utility. If no utility operand is
       specified, the resulting environment is written to the standard output,
       with one name=value pair per line.

   /usr/bin
       If  env  executes  commands  with  arguments, it uses the default shell
       /usr/bin/sh (see sh(1)).

   /usr/xpg4/bin
       If env executes commands with arguments, it uses /usr/xpg4/bin/sh  (see
       ksh88(1)).

OPTIONS
       The following options are supported:

       --help

           Display usage message and exit.


       -i | − | --ignore-environment

           Ignores  the environment that would otherwise be inherited from the
           current shell. Restricts the environment for utility to that speci‐
           fied by the arguments.


       -0, --null

           End each output line with a zero byte rather than with a newline.


       -u name, --unset=name

           Remove variable name from the environment.


OPERANDS
       The following operands are supported:

       name=value    Arguments  of  the  form  name=value modify the execution
                     environment, and are placed into the  inherited  environ‐
                     ment before utility is invoked.


       utility       The  name  of the utility to be invoked. If utility names
                     any of the special shell built-in utilities, the  results
                     are undefined.


       arg           A string to pass as an argument for the invoked utility.


EXAMPLES
       Example 1 Invoking utilities with new PATH values



       The following utility:


         example% env -i PATH=/mybin mygrep xyz myfile




       invokes  the  utility mygrep with a new PATH value as the only entry in
       its environment. In this case, PATH is used  to  locate  mygrep,  which
       then must reside in /mybin.

ENVIRONMENT VARIABLES
       See  environ(7) for descriptions of the following environment variables
       that affect the execution of env: LANG, LC_ALL, LC_CTYPE,  LC_MESSAGES,
       and NLSPATH.

       PATH    Determine  the location of the utility. If PATH is specified as
               a name=value operand to env, the value given shall be  used  in
               the search for utility.


EXIT STATUS
       If  utility  is  invoked,  the exit status of env is the exit status of
       utility. Otherwise, the env utility returns one of the  following  exit
       values:

       0        Successful completion.


       1-125    An error occurred.


       126      utility was found but could not be invoked.


       127      utility could not be found.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

   /usr/bin
       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Availabilitysystem/core-os _ CSIenabled


   /usr/xpg4/bin
       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE  VALUE _ Availabilitysystem/xopen/xcu4 _ CSIenabled _ Interface
       StabilityCommitted _ StandardSee standards(7).


SEE ALSO
       ksh88(1), sh(1), exec(2), getopt_long(3C),  profile(5),  attributes(7),
       environ(7), standards(7)



Oracle Solaris 11.4               13 Aug 2012                           env(1)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3