C Board  

Go Back   C Board > Platform Specific Boards > Linux Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 10-21-2003, 12:17 PM   #1
Registered User
 
Join Date: Sep 2003
Posts: 49
single environment variable

What is a single environment variable? I'm having trouble defining it. And how do you disply it?
__________________
Code this
SpEkTrE is offline   Reply With Quote
Old 10-21-2003, 12:35 PM   #2
twm
root
 
Join Date: Sep 2003
Posts: 232
>What is a single environment variable?
Just a simple environment variable.

>I'm having trouble defining it.
Depends on your shell, here are two common ones

bash:
Code:
$ export OOGA="This is a simple environment variable"
$ echo $OOGA
This is a simple environment variable
tcsh:
Code:
% setenv OOGA "This is a simple environment variable"
% echo $OOGA
This is a simple environment variable
Pretty much any other common shell will be a derivative of one of those two. Check your friendly neighborhood man pages to see how to do it with your shell.

>And how do you disply it?
What do you know, I answered two questions with one answer. Look above to see a way to echo a shell variable.
__________________
The information given in this message is known to work on FreeBSD 4.8 STABLE.
*The above statement is false if I was too lazy to test it.*
Please take note that I am not a technical writer, nor do I care to become one.
If someone finds a mistake, gleaming error or typo, do me a favor...bite me.
Don't assume that I'm ever entirely serious or entirely joking.
twm is offline   Reply With Quote
Old 10-21-2003, 12:36 PM   #3
Registered User
 
Join Date: Sep 2003
Posts: 49
Quote:
What do you know, I answered two questions with one answer. Look above to see a way to echo a shell variable.

lol, thanks!
__________________
Code this
SpEkTrE is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sorting number Leslie C Programming 8 05-20-2009 04:23 AM
How accurate is the following... emeyer C Programming 22 12-07-2005 12:07 PM
Static global variable acting as global variable? Visu C Programming 2 07-20-2004 08:46 AM
Use of variable alice C Programming 8 06-05-2004 07:32 AM
Variable goes out of scope in the child thread when parent thread returns hanhao C++ Programming 2 04-12-2004 01:37 AM


All times are GMT -6. The time now is 12:06 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22