On Mon, 28 Jan 2013 18:55:02 -0500, Fbsd8 wrote:
> I'm reading a script and i see a lot of exports.
> 
> Is there some command to display the exported environment?

Yes, sh's builtin "env" does this.



> The env command does not show them. Only see things made by setenv command.

It seems you're mixing shells here. The C Shell uses setenv
to set variables, printenv to list them. The systems's sh
uses export to set variables, and env to print them.

Example (with exported and non-exported variable:

        $ export ASDF=yxcvbnm
        $ env | grep ASDF
        ASDF=yxcvbnm

        $ JKL=qwertzuiop
        $ env | grep JKL
        $ echo $JKL
        qwertzuiop

And compare for the C shell:

        % setenv ASDF yxcvbnm
        % printenv | grep ASDF
        ASDF=yxcvbnm

        % set JKL=qwertzuiop
        % printenv | grep JKL
        % echo $JKL
        qwertzuiop

If you omit the "| grep" step, the full list will be printed.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to