02-11-2014
Well, what's different on your other servers?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi i want to write a shell script to set environment variables . But i am not been able to set that for the current shell instead i have to spawn a new shell. Is there a way to set the env variable for the current shell using shell script in bash shell ?
Thnx (2 Replies)
Discussion started by: varun.81
2 Replies
2. UNIX for Advanced & Expert Users
Hey all,
I have been using Ksh and in that I am setting Environment variables.
To set Env. Variables I have created my own file "BuildScript.sh" in which i have written :
export CLASSPATH=/somedir/some other dir/file:.
export PATH=/some dir/file:.
But when i am calling this... (4 Replies)
Discussion started by: varungupta
4 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am using the HP-UX machine of version B.11.23. My bashprofile looks like this :
# @(#)B11.23_LR
# Default user .profile file (/usr/bin/sh initialization).
#! /usr/bin/bash
# Set up the terminal:
if
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H"... (0 Replies)
Discussion started by: swethuanju
0 Replies
4. Shell Programming and Scripting
Hi,
I want to get the value of the env varables using the ksh script. All the env variables are stored in a file.
Eg.
file1
$INPATH
$OUTPATH
myscirpt:
for name in `awk { print $1 } file1`
do
cd $name
done
i'm getting the error like $INPATH not found.
in the same script... (1 Reply)
Discussion started by: vij_krr
1 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a script that sets some env variables.
I want to source the script in a new xterm and
after the script execution is over, the xterm has to be alive with the env variables set according to the script.
I tried
xterm -e "source ./myscript;tcsh" &
The variables are getting set... (3 Replies)
Discussion started by: chaitubek
3 Replies
6. UNIX for Dummies Questions & Answers
I am newbie on Unix system and seek help for updating env variables. The condition is like this:
On Unix server, I log in as oracle user (this is the super for database on Unix), I type > env
all envirnment variables show up. I saw one variable DBA_LIST contains a few email addreses. I need... (2 Replies)
Discussion started by: duke0001
2 Replies
7. Solaris
What is the difference between ${variable} and $variable when used in a script? (2 Replies)
Discussion started by: orange47
2 Replies
8. Red Hat
i have a file that i need to edit and replace a single value with another. so i have two variables, $oldvalue and $newvalue but below doesn't work:
ed file.txt << EOF
,s/$oldversion/$newversion/g
wq
EOFi presume it's the $ that is the issue since it's actually special to ed. any suggestions?... (1 Reply)
Discussion started by: crimso
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 ULTRIX
setjmp
setjmp(3) Library Functions Manual setjmp(3)
Name
setjmp, longjmp - non-local goto
Syntax
#include <setjmp.h>
int setjmp (env)
jmp_buf env;
void longjmp (env, val)
jmp_buf env;
int val;
Description
The and functions help deal with errors and interrupts encountered in a low-level subroutine of a program.
The function saves its stack environment in env (whose type, jmp_buf, is defined in the <setjmp.h> header file) for later use by It returns
the value 0.
The function restores the environment saved by the last call of with the corresponding env argument. After finishes, program execution
continues as if the corresponding call of (which must not itself have returned in the interim) had just returned the value val. The func-
tion cannot cause to return the value 0. If is invoked with a second argument of 0, returns 1. At the time of the second return from all
accessible data have values as of the time is called. However, global variables have the expected values. For example, those as of the
time of the
Examples
#include <setjmp.h>
jmp_buf env;
int i = 0;
main ()
{
void exit();
if(setjmp(env) != 0) {
(void) printf("value of i on 2nd return from setjmp: %d0, i);
exit(0);
}
(void) printf("value of i on 1st return from setjmp: %d0, i);
i = 1;
g();
/*NOTREACHED*/
}
g()
{
longjmp(env, 1);
/*NOTREACHED*/
}
If the a.out resulting from this C language code is run, the output is as follows:
value of i on 1st return from setjmp:0
value of i on 2nd return from setjmp:1
Unexpected behavior occurs if is called without a previous call to or when the last such call was in a function which has since returned.
Restrictions
The values of the registers on the second return from are register values at the time of the first call to not those of the Thus, variables
in a given function can produce unexpected results in the presence of depending on whether they are register or stack variables.
See Also
signal(2).
RISC setjmp(3)