01-31-2014
Shell Script for Setting Env Variables
Hello All.
Good Afternoon.
I need one small help regarding setting of env variables for a particular host by getting it from the DB.
For ex :
1. I am using LOCALHOST.
2. When I run a ./hostset.sh it should pick up the Oracle home details from associated DB and set it.
Please let me know is it a possible one. I am new this UNIX and I went through some of the links but not quite understanding the concept.
Thank you all for your help in advance.
Regards,
Pavan
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi everyone,
I am trying to set up the .profile for a user I have just created. In trying to set up the shell variables, I want to make the shell be korn shell (default shell i believe is Borne shell), so, this is what I did:
SHELL=/usr/bin/ksh
export SHELL
Whenl executing the .profile,... (1 Reply)
Discussion started by: rachael
1 Replies
2. Shell Programming and Scripting
Not sure what has changed in the Unix environment.
The following script which was working is now not working.
#!/usr/bin/ksh
# -----------------------------------------------------------------------------
# File: monitor_db.sh
#
#... (1 Reply)
Discussion started by: uuser
1 Replies
3. Programming
Hey, I'm brushing up on C code and I'm trying to incorporate the shell environmental variables into standard ansi C code.
For example I just want to do the equivalent of
--echo $PATH-- and implement that in standard ansi C code.
How would I do that?
Thanks (4 Replies)
Discussion started by: bdsffl
4 Replies
4. UNIX for Advanced & Expert Users
Hi !
How to export ENV variables, which remains set for all the shell
Example :-
Login :myID
Pwd : **** -> Here my ID .profile is executed. Let say I set MYENV variable
Kisses% rlogin ABC -l XXXGroupID -> I login into a remote Solaris Server ABC
password : **** -> "XXXGroupID's... (1 Reply)
Discussion started by: dashok.83
1 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I wrote two small scripts to set env variables in a shell.
java_env.csh
#!/bin/csh -fn
setenv JAVA_HOME '/scratch/software/jdk1.5.0_11'
setenv PATH $PATH':'$JAVA_HOME'/bin'
and run it using csh ./java_env.csh
But the env variables are not set. I tried running each line on the... (5 Replies)
Discussion started by: NoviceAmod
5 Replies
6. Shell Programming and Scripting
I'm wondering if any of you could lend an assist with a small problem.
First, I'm under the impression I need to use Delayed Environment Variable Expansion (DEVE), based on other things I've read across the web.
Summary: trying to use command shell (cmd.exe) in XP sp3 (if that's relevant) to... (4 Replies)
Discussion started by: ProGrammar
4 Replies
7. Shell Programming and Scripting
Hi,
I have the below script
#------------------------------------------------------------------------------
#Set up environment variables
#------------------------------------------------------------------------------
SCRIPTS_DIR=/remedy/scripts/ServerVolumeBilling... (3 Replies)
Discussion started by: anilvaranasi_02
3 Replies
8. Shell Programming and Scripting
Hi All,
I have made a file file usercreate.sh & it has to run in tcsh env & needs some path to be set.
my script is as below.
##########################
#!/bin/csh
setenv PATH "/usr/lib/java/class"
setenv LD_LIBRARAY_PATH
###########################
but when i am ruuning my script... (1 Reply)
Discussion started by: ajaincv
1 Replies
9. Shell Programming and Scripting
Hi All,
I have script and it's hardcoded the script ca invoke in user home dir and logs will be redirected to home dir of user.
how to make the same script will be invoke from /usr/bin with out chg the logs and other functions path from /user/homedir .
code is below: pls check how to... (1 Reply)
Discussion started by: saku
1 Replies
10. Shell Programming and Scripting
I have perl script and in the first line we are invoking .sh script to set ENV variables.
e..g
eval '. $envfile; exec $PERL -S $0 "$@"'
I want to change some of the env variables while the program is running and I am settging it like this ..
$ENV{ORACLE_HOME}=trim($oraclehome);... (1 Reply)
Discussion started by: talashil
1 Replies
LEARN ABOUT DEBIAN
apache::session::oracle
Apache::Session::Oracle(3pm) User Contributed Perl Documentation Apache::Session::Oracle(3pm)
NAME
Apache::Session::Oracle - An implementation of Apache::Session
SYNOPSIS
use Apache::Session::Oracle;
#if you want Apache::Session to open new DB handles:
tie %hash, 'Apache::Session::Oracle', $id, {
DataSource => 'dbi:Oracle:sessions',
UserName => $db_user,
Password => $db_pass,
Commit => 1
};
#or, if your handles are already opened:
tie %hash, 'Apache::Session::Oracle', $id, {
Handle => $dbh,
Commit => 1
};
DESCRIPTION
This module is an implementation of Apache::Session. It uses the Oracle backing store and no locking. See the example, and the
documentation for Apache::Session::Store::Oracle for more details.
USAGE
The special Apache::Session argument for this module is Commit. You MUST provide the Commit argument, which instructs this module to
either commit the transaction when it is finished, or to simply do nothing. This feature is provided so that this module will not have
adverse interactions with your local transaction policy, nor your local database handle caching policy. The argument is mandatory in order
to make you think about this problem.
This module also respects the LongReadLen argument, which specifies the maximum size of the session object. If not specified, the default
maximum is 8 KB.
AUTHOR
This module was written by Jeffrey William Baker <jwbaker@acm.org>.
SEE ALSO
Apache::Session::File, Apache::Session::Flex, Apache::Session::DB_File, Apache::Session::Postgres, Apache::Session
perl v5.10.1 2010-10-18 Apache::Session::Oracle(3pm)