05-06-2009
set env variables in a new xterm
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 during program execution.
I knew this because i used an echo in the script.
After the program execution is over, the xterm is alive,
but the env variables are lost.
Please help me.
Thank u.
10 More Discussions You Might Find Interesting
1. Solaris
Hi,
We have problems with the latin 2 Character-set with xterm.
We have installed SunRay-Server with Solaris 8. Our Thinclients use hu- and cz-keyboards. I have set the right local-settings and xmodemaps. If I use the dtterm all is running fine. As soon as I use the xterm, it cannot display... (0 Replies)
Discussion started by: paho
0 Replies
2. Solaris
Hello Friends,
I am using solaris 10 operating system. I would like to know how to use the xterm color in it. I am trying this command:- xterm -bg color, but it is giving this
talc:/home/ania {ania} xterm -bg color
21469
-bg: Command not found.
What should i do? Can u help me... (3 Replies)
Discussion started by: asirohi
3 Replies
3. 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
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. Solaris
Hello
whenenver i login to solaris server the prompt is displaying as #. i want to customize the promt with server name for all users.
how to customize the PS1 variable for all the users?.
Thanks for your help in advance.
regards,
Saravana (2 Replies)
Discussion started by: tsaravanan
2 Replies
6. Solaris
What is the difference between ${variable} and $variable when used in a script? (2 Replies)
Discussion started by: orange47
2 Replies
7. 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
8. Red Hat
Hi,
I still cant find step by step manual how to make my putty display let say PWD in its title, read about some xterm, but where it is?
Can anybody help me with this.
Thx
M (4 Replies)
Discussion started by: trento17
4 Replies
9. Red Hat
Hi,
I need to add file the /usr/lib under the command set. The /usr/lib need to be set under the DIRS=' ' while listing the set command.
I tried with the command below:
export PATH=${PATH}:/usr/bin
But this doesn't work out... (4 Replies)
Discussion started by: gsiva
4 Replies
10. UNIX for Dummies Questions & Answers
Hi ,
I have installed oracle in Solaris machine and unable to set the env variable. I tried to put the env variable in .dtprofile file but didn't help. So everytime I login in need to run the command and export the variable. Kindly suggest where I am doing wrong.Pls excuse as I am not too... (2 Replies)
Discussion started by: Rossdba
2 Replies
SETJMP(3) Library Functions Manual SETJMP(3)
NAME
setjmp, longjmp - non-local goto
SYNOPSIS
#include <setjmp.h>
setjmp(env)
jmp_buf env;
longjmp(env, val)
jmp_buf env;
_setjmp(env)
jmp_buf env;
_longjmp(env, val)
jmp_buf env;
DESCRIPTION
These routines are useful for dealing with errors and interrupts encountered in a low-level subroutine of a program.
Setjmp saves its stack environment in env for later use by longjmp. It returns value 0.
Longjmp restores the environment saved by the last call of setjmp. It then returns in such a way that execution continues as if the call
of setjmp had just returned the value val to the function that invoked setjmp, which must not itself have returned in the interim. All
accessible data have values as of the time longjmp was called.
Setjmp and longjmp save and restore the signal mask sigmask(2), while _setjmp and _longjmp manipulate only the C stack and registers.
ERRORS
If the contents of the jmp_buf are corrupted, or correspond to an environment that has already returned, longjmp calls the routine longjm-
perror. If longjmperror returns the program is aborted. The default version of longjmperror prints the message ``longjmp botch'' to stan-
dard error and returns. User programs wishing to exit more gracefully can write their own versions of longjmperror.
SEE ALSO
sigvec(2), sigstack(2), signal(3)
NOTES (PDP-11)
On the PDP-11, longjmperror is called as _ljerr. This difference stems from the limited name size of the PDP-11 that requires all external
names to be unique within the first seven characters. However, <setjmp.h> automatically translates longjmperror to ljerror and should be
included before any definition longjmperror.
The PDP-11 implementation also contains a subtle bug that occurs when a routine containing a setjmp has register variables. The bug some-
times causes those variables to be given invalid values when a longjmp is made back to the routine. Register variables should therefore be
avoided in routines containing setjmps.
And finally, _longjmp may sometimes die fatally. Sorry.
4th Berkeley Distribution January 9, 1986 SETJMP(3)