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
environment variables radhika03 Shell Programming and Scripting 3 01-22-2007 10:58 AM
environment variables sumsin High Level Programming 6 03-13-2006 08:17 AM
help..Environment variables... sekar sundaram UNIX for Dummies Questions & Answers 3 08-30-2005 12:35 AM
environment variables Esaia High Level Programming 2 02-20-2003 05:19 PM
what is the use of Environment variables indianguru UNIX for Dummies Questions & Answers 2 07-24-2001 06:41 PM

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

Join Date: Aug 2002
Posts: 9
environment variables

Hi Folks,

Is it possible somehow to unset all the environment variables which have been defined before in UNIX (Solaris).

Thanks,
Slava
Forum Sponsor
  #2  
Old 08-20-2003
davidg's Avatar
Registered User
 

Join Date: Jul 2003
Location: Holland
Posts: 207
type "set"
then unset each by each or do it using a scripto (using exec, as it will else do a fork and the env variables of the new fork will only be unset, not your current shell) ?

Regs David
  #3  
Old 08-20-2003
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
You can start up a shell with no environment variables by:
env - /usr/bin/ksh
  #4  
Old 08-20-2003
oombera's Avatar
Registered User
 

Join Date: Aug 2002
Location: Cleveland, OH
Posts: 804
Adding to davidg's post, you may need code like this:
Code:
set | awk -F= '{print $1}' | while read VAR
do
  unset $VAR
done
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 07:48 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