Hamilton LaboratoriesHamilton C shell 2012User guideExternal utilities


Oregon Coast

Previous | Next

        env:  Execute a command with a new environment

Usage:  env [-] [-iCDNtTwh-] [ name=value ] ... [ command ]

   env will modify the current environment according to the
   arguments and run an arbitrary command.

   The command can refer to any executable file or to a C shell
   command or alias.  If a complete path is not specified, env
   will look through the search path.  If an extension is not
   specified, env will try all the usual possibilities:  .csh,
   .exe, .com, .cmd and .bat.  If a corresponding executable
   file cannot be found, env will assume the command is an
   internal C shell command or alias.  If no command is
   specified, env will print out the resulting environment,
   one name=value pair per line.


   -             Obsolete version of -i.
   -i            Only the environment specified on the command
                 line will be passed to the child.  The inherited
                 environment is not.
   -C            Start up a copy of C shell to run each command.
   -D            Any environment variables set to a null string
                 on the command line will be deleted from the
   -N            New console.  Open a new window to run the
                 command.  Meaningful only when running a
                 console application.
   -t            Trace mode.  The command line is written to
                 stderr just prior to invocation.
   -T            Change the title bar when starting the child.
   -w            Wait for the child to exit before returning,
                 even if it's running in a new window.

   -h            Help.  (This screen.)
   --            End of options.

Previous | Next