The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
difference between EXPORT and setenv dexkid UNIX for Dummies Questions & Answers 3 02-07-2008 12:06 AM
How do I set permanent setenv !!! geoquest Shell Programming and Scripting 1 09-07-2002 05:53 AM
What 's setenv? myoeminn Shell Programming and Scripting 2 03-05-2002 06:24 PM
set, setenv w6u6f UNIX for Dummies Questions & Answers 1 01-31-2002 01:58 PM
setenv Question ianf UNIX for Dummies Questions & Answers 3 12-19-2001 02:38 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 11-10-2003
Registered User
 

Join Date: Oct 2003
Location: Brazil
Posts: 42
Angry Difference between SET and SETENV

I never undestood exactly what's the difference between the SET and SETENV commands.

One sets variables visible to all users and the other (SETENV) only to the specific user environment ?

Thanks in advance,

BraZil - thE heLL iS HEre !!!
Forum Sponsor
  #2  
Old 11-10-2003
google's Avatar
Moderator
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
I think that SETENV may be more of C-shell specific thing. According to O'Reilly, SETENV assigns a value to an environment variable. If no arguments are provided, then setenv will produce a list of all names and values in the current environment. The SET command, sets a variable equal to a value. With no arguments, it displays the names and values of all set variables.

C Shell, maintains a set of environment variables which are distinct from the shell variables and arent really part of the C shell. Shell variables are meaningful only within the current shell, but environement varialbes are automatically exported, making them available globally. C shell variables are only available to a particular script in which they are defined, where as environment variables can be used by any shell script, mail utility or editors that you may invoke. (OReilly, UNIX In A NutShell)

Korn/Bourne shells dont have the SETENV command (I dont think anyway)
  #3  
Old 11-10-2003
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
Quote:
Originally posted by google

Korn/Bourne shells dont have the SETENV command
In korn/bourne you export a variable to get it into the environment.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:34 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0