The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
about environment variable Arunprasad Shell Programming and Scripting 6 10-03-2008 02:36 AM
Environment variable MasterapocA SUN Solaris 2 03-18-2008 09:39 AM
TOR environment variable Wittich UNIX for Dummies Questions & Answers 3 07-30-2003 12:40 PM
help on environment variable mehuldoshi UNIX for Advanced & Expert Users 6 03-29-2003 12:45 PM
Environment Variable jacobsa UNIX for Dummies Questions & Answers 8 06-03-2002 03:02 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-30-2009
Kattoor Kattoor is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 25
Add Environment variable in C/C++

Hi Friends,

Can anybody help me out to add an environment variable in a C program.

Actually I need to open a log file in the program.So the log file path I need to take as an environment variable.

Can anybody help me out?

Thanks in Advance...!
  #2 (permalink)  
Old 04-30-2009
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,798
Do you have any code snippet that you have already written ?

You need to use getenv. Look into man getenv. It explains what to do.
  #3 (permalink)  
Old 04-30-2009
Kattoor Kattoor is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 25
Quote:
Originally Posted by vino View Post
Do you have any code snippet that you have already written ?

You need to use getenv. Look into man getenv. It explains what to do.
Ya got it...

Thanks a lot..!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:53 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0