Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
IBM : developerWorks : Linux : Education - Tutorials
LPI certification 101 exam prep, Part 3
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
5. Tuning the user environment
  


Unset vs. FOO= page 11 of 13


This is not the same as setting a variable to nothing, although it is sometimes hard to tell the difference. One way to tell is to use the set built-in with no parameters to list all current variables:


$ FOO=bar
$ set | grep ^FOO
FOO=bar
$ FOO=
$ set | grep ^FOO
FOO=
$ unset FOO
$ set | grep ^FOO

Using set with no parameters like this is similar to using the export built-in, except that set lists all variables instead of just those marked for export.


Main menuSection menuFeedbackPreviousNext
PrivacyLegalContact