![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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
|
||||
|
||||
|
You can start up a shell with no environment variables by:
env - /usr/bin/ksh |
|
#4
|
||||
|
||||
|
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 |