[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Exported (ba)sh functions in the environment



Philip Ashmore <contact@philipashmore.com> writes:

> According to "man sh" (which links to the dash man page)

>      set [{ -options | +options | -- }] arg ...
>             The set command performs three different functions.

>             With no arguments, it lists the values of all shell variables.

> So are these copied every time a script runs?

Only exported shell variables become part of the environment.  The rest
are local to the specific shell.  "env" will show just the environment.

I'm curious why even your set of shell variables is so large, though.  My
environment is only 1699 bytes on a system I logged onto via ssh, and 1998
on my desktop (running Xfce).  One of the biggest chunks of that is
LS_COLORS.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: