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)
Check Out this Related Man Page
ENV(1) User Commands ENV(1)NAME
env - run a program in a modified environment
SYNOPSIS
env [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]
DESCRIPTION
Set each NAME to VALUE in the environment and run COMMAND.
-i, --ignore-environment
start with an empty environment
-0, --null
end each output line with 0 byte rather than newline
-u, --unset=NAME
remove variable from the environment
--help display this help and exit
--version
output version information and exit
A mere - implies -i. If no COMMAND, print the resulting environment.
AUTHOR
Written by Richard Mlynarik and David MacKenzie.
REPORTING BUGS
Report env bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report env translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for env is maintained as a Texinfo manual. If the info and env programs are properly installed at your site, the
command
info coreutils 'env invocation'
should give you access to the complete manual.
GNU coreutils 8.5 February 2011 ENV(1)
How to set the display environment variable through a script?
i tried that using "setenv" but it gave me error.
is there any idea?
:confused: (19 Replies)
I am a beginer at Unix, and I need some help, i've created a menu which works ok, but i need the menu to be appear as soon as i log in, this would make it more user friendly and quicker to access. Dunno if it is possible but, if u can help please post a reply. Thanx and Merry Christmas to every1.... (8 Replies)
Dear Guys ,
i installed sun solaries 8 for intel platform .
now i want to edit root env or init. files in order to add the follwing :
EDITOR=vi
export PATH EDITOR
export PS1=`uname -n`:\$PWD\>
set -o vi
alias dir="ls -la|more"
alias c=clear
stty erase "^H"
what file i have to... (13 Replies)
if i do this 5 times
env >> xx
env >> xx
env >> xx
env >> xx
env >> xx
il will a file called XX with the env redirected into it 5 times
i need to create a script that takes 1 argument being a file, in this instancei ll use the newly created file above xx read the inputted file, in this... (13 Replies)
Hi all, how do i modify a variable's value.
var1='abcd efgh ijkl mnop abcd'
how do i get var2 from var1
var2=$(......)
$echo var2
abcd efgh ijkl mnop
i.e. i have removed a duplicate occurence.
or in general how to modify a varible.
thanks in advance (6 Replies)
For a Script I need to detemine which field of the unix environment variable SHLIB_PATH has the
WALTDB entry.
export SHLIB_PATH=/usr/user5/WALTDB/oracle/product/10.2.0/lib32:/usr/TZD/bin.wdad/mug/oracle/lib:
echo $SHLIB_PATH | awk -F: '{ print $1 }'
Shure gives me the first entry, but... (6 Replies)
I've searched Google and now this forum. Best guess is my search fu is not good (and it probably isn't). The Google search did bring me here.
Background
I have a number of Korn Shell scripts who all use one of 3 values for an environment variable used in the backup system.
On occasion one or... (8 Replies)
I have test.pl scrit with these few lines.
#!/usr/bin/perl
$ENV{'ORACLE_SID'} = "D3771";
$ENV{'ORACLE_HOME'} = "/oracle/product/10.2.0/db_1";
When I try . test.pl it throws an error. When I try test.pl, it doesn't reaing the variables I set in the script.
-> . test.pl
ksh:... (10 Replies)
Hi All,
In ksh, am trying to get a substring stuff done. Not sure where the problem is.. can you guys guide me on this...
for instance, var1=41, and var2=4175894567, then i want to know whether var2 starts with var1.. var1 and var2 can be of any length..
VAR1=41
VAR2=419068567777... (6 Replies)
Hello my friends i have created a perl cgi script to see browser support for text and graphics but $ENV variable is not working ,
Code is:
#!/usr/bin/perl
#Author Ravinder kumar
# START
use warnings;
$nongraphic = 'lynx|CERN-Linemode|elinks';
$client = $ENV{'HTTP_USER_AGENT'};
$text... (9 Replies)
In our project we have several unix scripts that trigger different processes. These scripts write logs to a particular folder 'sesslogs', create output data files in a separate directory called 'datafiles' etc. Usually L1 support team re-run these scripts . We donot want L1 support team to have... (14 Replies)
Hi,
when I run "env" there are few variable prinitng related to application
$env
SRV=test
NVV=test2
from where this file is invoking, I checked in ./bash_profile and ./profile didn't find the variable.
So what is the file I need to edit this variable. (8 Replies)
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)
Well I have just noticed over the years that I have PMs that I have not seen or even known about.
Apologies if any of you have not had any replies to your PMs. It is too late now as some go back to my early days on here.
The notification that comes up currently has notified me of a couple... (10 Replies)