by using c++ how to set environment variables in unix


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users by using c++ how to set environment variables in unix
# 1  
Old 03-21-2006
by using c++ how to set environment variables in unix

hi,

I am writing c++ code in unix operating system.In that i need to set the environment variable in unix.

suppose previously i have environment variable like path="something" now i need to change the path value to some othervalue . so that some other program will access that path value and by using new path value some new program will work.so please tell me the way for this.


After changing the environement variable i need to access that changed environment variable for some running another program.
# 2  
Old 03-21-2006
Dont break the rules by bumping up your posts. Here is your original thread - how to set the environment variable at run time
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

UNIX $USER and $LOGNAME environment variables

I have some comments about a previously closed topic whose name is the same as above Omitted from the discussion was the situation with a "sudo command or sudo within a script". There is an inconsistency between systems. On some systems $LOGNAME is invariant, on others, on RedHat sudo... (3 Replies)
Discussion started by: lsatenstein
3 Replies

2. UNIX for Beginners Questions & Answers

Trying to figure out how the environment variables are being set

I just started a new job and I've been tasked with cleaning up the files that set up all the environment variables. The system works as is. What happens is: 1. You log in to the server. 2. You call a file that sets a bunch of environment variables and that displays a list of all the databases... (4 Replies)
Discussion started by: Keyeh
4 Replies

3. Shell Programming and Scripting

Using Datastage environment variables in Unix script

Hi All, I am using ETL tool Datastage and is installed on Linux environment. Few environment variables are set in datastage. Now my requirement is to use those environment variables in a unix script. Is there any option I can do it? Sugeestions from people working on datastage and linux... (1 Reply)
Discussion started by: bghosh
1 Replies

4. Shell Programming and Scripting

Need to SET Environment variables

Hi Could you please tell me how to set environment variables in Unix ksh. And how can acess those varibles in shell scripts ( Please give the code with an example) For my scenario. We have written number of shell scripts with hard coded username and password. But if we want to... (1 Reply)
Discussion started by: shyamu544
1 Replies

5. Shell Programming and Scripting

Unix $USER and $LOGNAME environment variables

Hi, I am wondering what is the difference between the USER and LOGNAME environment variables, and under what situations would they be different? I am using Ubuntu 8.04 32-bit and I do not have 'login' command to test it. (7 Replies)
Discussion started by: royalibrahim
7 Replies

6. Shell Programming and Scripting

perl. How to set persistent environment variables

I have test.pl scrit with these few lines. #!/usr/bin/perl $ENV{'ORACLE_SID'} = "D3771"; $ENV{'ORACLE_HOME'} = "/oracle/product/10.2.0/db_1"; When I try . test.pl it throws an error. When I try test.pl, it doesn't reaing the variables I set in the script. -> . test.pl ksh:... (10 Replies)
Discussion started by: MKNENI
10 Replies

7. SCO

Help finding where certain environment variables are set

i have two machines that should be identical but on one system there are some oracle environment (ORACLE_SID, ORACLE_HOME, etc...) variables that are not being set for the users. I am trying to find where those environment variables are being set on the system which is working properly. All... (5 Replies)
Discussion started by: kuliksco
5 Replies

8. UNIX for Dummies Questions & Answers

how to set up linux environment variables?

Hi I'm using Linux, in the directory /root/my there is a.out. but when I try to run it , the shell indicate "bash:a.out: command not found" but I AM working in this directory. if I use "./a.out" , it works perfectly. can any body tell me how to do a permanent set up so that I can use... (5 Replies)
Discussion started by: dell9
5 Replies

9. UNIX for Advanced & Expert Users

Set up the own Unix ENvironment at home

Hello! All Unix Expert, I just graduated from college with Bachalor degree in Computer Information System, and decided to start my career in Unix System. I am trying to set up my own unix Environment at home so that I can get more hand on experience since the class offered by unix vendors are... (1 Reply)
Discussion started by: jung1975
1 Replies

10. UNIX for Dummies Questions & Answers

How Do I set up a UNix dev environment

Hello, I am totally new to Unix. My current contract requires me to build an intranet site (nothing fancy, no forms, no cgi scripts, no search engine) for a unix platform. I develop on an NT environment using dreamweaver. I am considering buying Red Hat Linux, install that on the NT... (1 Reply)
Discussion started by: alam
1 Replies
Login or Register to Ask a Question