Where are the environment variables?

Where are the environment variables?

Post by HPBudlo » Tue, 18 Apr 2000 04:00:00



RE: Where are the environment variables?

bash, sh, and ksh and similar shells use environment variables such as $PS1,
$PS2. printenv lists some but not all of these, e.g. $PS1 is listed, $PS2 is
not, though $PS2 clearly has a value and shows up with
echo $PS2

This is true with other environment variables as well.

Why don't they all show up in printenv?

Best wishes
Helen Budlong

 
 
 

Where are the environment variables?

Post by Eric Amic » Tue, 18 Apr 2000 04:00:00



> RE: Where are the environment variables?
> bash, sh, and ksh and similar shells use environment variables such as $PS1,
> $PS2. printenv lists some but not all of these, e.g. $PS1 is listed, $PS2 is
> not, though $PS2 clearly has a value and shows up with
> echo $PS2

PS1, PS2, and some other variables are not exported.  Since printenv is an
external program, it will print only exported variables.  The only way to
print all variables in the current environment is with a builtin such as
set.

--
Eric Amick
Columbia, MD


 
 
 

1. Why does the cgi environment not inherit environment variables?

When using apache it normally inherits the environment in which it was
started and keeps this environment for executing cgi scripts. For example:
if root has oracle environment variables such as ORACLE_SID set when
starting the server then these are normally available to cgi scripts when
they execute much like the path is. However sometimes and specifically this
time they are not. Could someone explain how this works? It seems to be
somewhat random to me. I've had situations where various instances of the
server had different paths than others.

I'm running apache 1.3.4 and apache 1.3.6 on solaris 2.7 with mod_perl 1.18
and 1.19 respectively.

Matt

2. Awe32, linux 2.4.18, IRQ conflicts

3. how to export shell environment variables to the primary environment?

4. Linux + Legend PCI Video Card

5. c shell script; Howto use environement variables to build environment variables and take their value

6. Linux Frequently Asked Questions with Answers (Part 5 of 6)

7. Difference between shell variables and environment variables!

8. Linux and DIP config for bootp

9. difference between shell variable and environment variable

10. How to get value of environment variable in variable name?

11. Setting variables in a variable array of null variables

12. 2.x mod_ssl X.509 DN environment variable attributes

13. Cron Problem and Environment Variables