I want to cange env variable on SunOS.
I tried:
it changed it only localy for my session.
when i opened a new session (telnet etc') the old value exist.
How can I change it to effact all sessions.
Thanks.
Last edited by Franklin52; 03-15-2011 at 07:18 AM..
Reason: Please use code tags, thank you
Question 1: If I set ENV=$HOME/myenvprofile.ksh, will my script get executed when ever I login to my with KSH. My doubt is we used to put this in .profile of our home directory. SO when ever I login will it executed?
QUestion 2: If I set ENV=`echo "hi"` or 'echo "hi" ', what would be the output.... (0 Replies)
I have 2 scripts t2.sh calls t1.sh. I need to get the vaule of a env variable from t1.sh
/tmp/test$ cat t1.sh
#!/bin/sh
INSTANCE="font/fc-cache"
export INSTANCE
svcadm disable ${INSTANCE}
/tmp/test$ cat t2.sh
#!/bin/sh
. /tmp/test/t1.sh
echo ${INSTANCE}
The above works... (9 Replies)
Greetings:
I need to remove 'RUBYOPT' env variable to install MacRuby. I see it via $env (tchrc).
I checked my (local) .tcshrc, .login, .profile files: not defined there. Apparently, it's not set locally. I know this RUBYOPT is global, since I can see it in another account on my... (4 Replies)
Hi,
I have a small requirement
set -x
`grep IMPACT_HOME=/opt/impact /opt/NETCOOLINST/r.txt | cut -d'=' -f2`
if ;
then
sed 's#IMPACT_HOME=*#d' /opt/NETCOOLINST/r.txt
echo "IMPACT_HOME=" >> /opt/NETCOOLINST/r.txt
sed 's#IMPACT_HOME=*#IMPACT_HOME=/opt/impact#g' /opt/NETCOOLINST/r.txt... (2 Replies)
(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)
Hi All,
I have a requirement where I have a config file, which contains 2 coulmn.values of first column are environmnet variable, whose value is defined in an environment file.
In my script I need to read the config file, and get the value of the config file variable from env file.
I... (2 Replies)
Discussion started by: alok2082
2 Replies
LEARN ABOUT DEBIAN
env::sanctify
Env::Sanctify(3pm) User Contributed Perl Documentation Env::Sanctify(3pm)NAME
Env::Sanctify - Lexically scoped sanctification of %ENV
VERSION
version 1.06
SYNOPSIS
my $sanctify = Env::Sanctify->sanctify( sanctify => [ '^POE' ] );
# do some stuff, fork some processes etc.
$sanctify->restore
{
my $sanctify = Env::Sanctify->sanctify( env => { POE_TRACE_DEFAULT => 1 } );
# do some stuff, fork some processes etc.
}
# out of scope, %ENV is back to normal
DESCRIPTION
Env::Sanctify is a module that provides lexically scoped manipulation and sanctification of %ENV.
You can specify that it alter or add additional environment variables or remove existing ones according to a list of matching regexen.
You can then either "restore" the environment back manually or let the object fall out of scope, which automagically restores.
Useful for manipulating the environment that forked processes and sub-processes will inherit.
CONSTRUCTOR
"sanctify"
Creates an Env::Sanctify object. Takes two optional arguments:
'env', a hashref of env vars to add to %ENV;
'sanctify', an arrayref of regex pattern strings to match against current %ENV vars;
Any %ENV var that matches a "sanctify" regex is removed from the resultant %ENV.
METHODs
"restore"
Explicitly restore the previous %ENV. This is called automagically when the object is "DESTROY"ed, for instance, when it goes out of
scope.
AUTHOR
Chris Williams <chris@bingosnet.co.uk>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Chris Williams.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-03-14 Env::Sanctify(3pm)