Sponsored Content
Full Discussion: env command
Top Forums Shell Programming and Scripting env command Post 302501223 by mnmonu on Thursday 3rd of March 2011 02:39:58 AM
Old 03-03-2011
The external env command creates a new environment for executing a given command. Depending on the options, env either uses the current environment or completely ignores it. If env uses the environment, modifications are made based on the arguments given. After the new environment is set up, the command argument is executed.

The env command is useful for testing commands in controlled environments. It may be used to execute a command in a new environment without affecting your own personal environment. It is probably used more to display the current environment than as a command executor.

Following is the general format of the env command.
env [ - ] [ name=value ... ] [ command [ options ] [ args ] ]
 

10 More Discussions You Might Find Interesting

1. Solaris

Env

hey guys!!!! i have a few question .. how to modify the user ENV in Sun Solaris 10 ... Thanks!!!! (1 Reply)
Discussion started by: giancarlodjabon
1 Replies

2. Shell Programming and Scripting

Adding command line env in cron env

Hello friends, i run two scripts manually & they work. i run them in cron & they don work. how to match the two env's 1.command line env 2.cron env i would like cron to use command line env. Thanks & Regards Abhijeet (1 Reply)
Discussion started by: abhijeetkul
1 Replies

3. Shell Programming and Scripting

env

Hi, I want to check the path set for a particular variable.Like when i use "env" command ,so many variables are there.I have to search for that variable which i need.Instead can i have any cmd which i can directly check the path set for that variable except "echo $path_name" Thanks, ... (3 Replies)
Discussion started by: rrs
3 Replies

4. Shell Programming and Scripting

About command "env"

I am not sure about the command "env", what I understand now is it is setting the environment variable for a particular program. I have a program called myApp. My question is should myApp be running before I run the command env myKey=value1 myApp ? (1 Reply)
Discussion started by: jack1234
1 Replies

5. Programming

Differece between "env" and "set" command

Hi, Please clarify what is the difference between "env" and "set" command. I guess set will display the system variables and user defined variables. Thanks Sweta (1 Reply)
Discussion started by: sweta
1 Replies

6. Shell Programming and Scripting

HOME env

Do you know shell in Linux without HOME env ? Best regards, Iliyan Varshilov Edit/Delete Message (1 Reply)
Discussion started by: ilko_partizan
1 Replies

7. Programming

HOME env

Do you know shell in Linux without HOME env. Best regards, Iliyan Varshilov (1 Reply)
Discussion started by: ilko_partizan
1 Replies

8. HP-UX

I want a HP-UX ENV,how could I?

just for practice,:) (1 Reply)
Discussion started by: freebsdjlu
1 Replies

9. Web Development

Deny from env=env-variable Does not work

(Above from Apache docs). On my system, using: SetEnvIf User-Agent Mozilla IsBad=1 Order allow,deny Allow from all Deny from env=IsBad ...I see that environment variable is set (using phpinfo()) but the page is still served. No errors in the Apache logs. (1 Reply)
Discussion started by: gnurob
1 Replies

10. UNIX for Beginners Questions & Answers

How to use env command to change GREP_OPTIONS variable?

How could I use the env command to change the enviroment variable GREP_OPTIONS so that grep is not case sensitive by setting it to "-i'? So that the command: grep a <<< A Will produce the same output as grep -i a <<< A (8 Replies)
Discussion started by: steezuschrist96
8 Replies
ENV(3)							     Library Functions Manual							    ENV(3)

NAME
env - environment variables SYNOPSIS
bind #e /env /env/var1 /env/var2 ... DESCRIPTION
The env device serves a one-level directory containing files with arbitrary names and contents. The intention is that the file name is the name of an environment variable (see rc(1)), and the content is the variable's current value. When a fork(2) system call creates a new process, both the parent and the child continue to see exactly the same files in the env device: changes made in either process can be noticed by the other. In contrast, an rfork system call with the RFENVG bit set (see fork(2)) causes a split: initially both process groups see the same environment files, but any changes made in one process group cannot be noticed by the other. An rfork with RFCENVG splits and then clears the environment. SEE ALSO
rc(1), fork(2) SOURCE
/sys/src/9/port/devenv.c BUGS
A write starting at an offset after the current extent of a file yields an error instead of zero filling. ENV(3)
All times are GMT -4. The time now is 06:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy