It is currently Tue, 17 May 2022 19:30:09 GMT



 
Author Message
 set and env commands in Korn shell
Executing "set" and "env" results in two (overlapping) sets
of "keyword" variables and their values.

Would someone please explain the significance of ther
differences?

man env says: "The env utility obtains the current
environment..." but man set is less clear. Why are there
values displayed by set that are not displayed by env?

Thanks.

--
Pete Holsberg -- Columbus, NJ 08022
NOTE: To get email address, remove "nospam."



 Mon, 13 Oct 2003 02:05:04 GMT   
 set and env commands in Korn shell
In article <9c73kg$ip...@lawrenceville.mccc.edu>,
Pete Holsberg  <p...@nospam.mccc.edu> wrote:

Environment variables are variables that are automatically inherited by
child processes.  They're often used to hold settings that are needed by
all processes in a login session (e.g. $PATH, $TERM, $LOGNAME).  Shell
variables are just visible in the current shell, and are mostly used as
programming variables in shell scripts or as shell-specific settings.

The "export" command will turn a shell variable into an environment
variable.

--
Barry Margolin, bar...@genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.



 Mon, 13 Oct 2003 02:23:21 GMT   
 set and env commands in Korn shell

Nice explanation, Barry!

So the results of executing "env" should be a subset of the
results of executing "set"?

Thanks.

--
Pete Holsberg -- Columbus, NJ 08022
NOTE: To get email address, remove "nospam."



 Sat, 18 Oct 2003 23:41:00 GMT   
 set and env commands in Korn shell
In article <9cmlec$1g...@lawrenceville.mccc.edu>,
Pete Holsberg  <p...@nospam.mccc.edu> wrote:

Yes.  Try it and see.

--
Barry Margolin, bar...@genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.



 Sun, 19 Oct 2003 00:21:24 GMT   
 set and env commands in Korn shell

There were a couple of "interesting" differences that I
hope you will explain to me. :-)

In the output of set, there was
        ANS=''
but in the output of env, it appeared as
        ANS=

Env displayed
        A__z="*TMOUT

and I have no idea where it came from.

Thanks,
Pete



 Sun, 19 Oct 2003 22:50:37 GMT   
 set and env commands in Korn shell
In article <9cp6rt$8f...@lawrenceville.mccc.edu>,
Pete Holsberg  <p...@nospam.mccc.edu> wrote:

The set command puts quotes around values that need to be quoted, while env
just displays them as they are.  But they're both showing the same
variable with the same value.

Me, either.

--
Barry Margolin, bar...@genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.



 Mon, 20 Oct 2003 05:51:03 GMT   
 
   [ 6 post ] 

Similar Threads

1. Help in Setting map key in Korn shell env

2. set command and tabs (Korn shell)

3. Korn shell ENV

4. Command completion for Korn Shell command line

5. shell env setting from w/in shell

6. best korn shell resources and is there a korn shell faq

7. Korn shell: getting an ls in the middle of typing a command

8. Korn shell command line prompt ????

9. Exit-command in Korn shell script

10. conflicts between Korn shell and alias command


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software