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)
Hello,
<Preamble>
I'm writing an installation script for use with PKGADD. What I want to do is take one of the variables set in the REQUEST script and use that in the install script so I can change applications configuration.
My install script is as follows:
sed '
/^DIRNAME/ i\... (8 Replies)
I have about 20 different variables that I need to check for null values then replace with a specific string if they are null. I've been doing this via 20 different if then statements like this:
if ; then
WIND="UUU"
fi
Is there a more elegant way to do this? The vars aren't sequential in... (6 Replies)
Hi,
I am using HP-UNIX.
I have a requirement as below
I have to change env twice like:
cadenv <env>
cadenv <env>
ccm start -d /dbpath
ccm tar -xvf *.tar
ccm rcv ....
mv *.tar BACKUP
but after I do the first cadenv <env> , I am unable to execute any of the later commands .
... (6 Replies)
Hi all
How do I use awk such that it does not require an input file? I have a situation where I need to process some shell vars within awk (passed into awk with "-v VAR1=$VALUE1, VAR2=$VALUE2" etc), but that processing does not require/use an input file.
Any guidance?
TIA
JG (2 Replies)
i have pleasure in using shell scripts and vi editor.
VI Improved on Linux is also good.
Is there a way that allows using shell as command interpretor
and VIm as editor to work on windows? (not vi.exe)
any help....... (1 Reply)
Hi
I have a /bin/sh script, that when executed changes some env vars (like $path).
How can I source the modified cshrc?
I dont want to logout and login to have the modifed path.
sh doesnot recognize source as I understand it is defined only in bash
rehash also doesnot work..
Any ideas... (10 Replies)
I have a shell script I want to run that will set environment variables based on the value of an input variable submitted when the shell script is called. For example:
$ mgenv.sh prod
This would set environment variables for prod
$ mgenv.sh test
This would set environment variables... (1 Reply)
I need to process a file line-by-line using some value from a shell variable
Something like:perl -p -e 's/$shell_srch/$shell_replace/g' input.txt
I can't make the '-s' work in the '-p' or '-n' input loop (or couldn't find a syntaxis.)
I have searched and found... (4 Replies)
Discussion started by: alex_5161
4 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)