This is an old revision of the document!

The unset builtin command

unset [-f] [-v] [NAME...]

The unset builtin command is used to unset values and attributes of shell variables and functions. Without any option, unset tries to unset a variable first, then a function.


Option Description
-f treats each NAME as a function name
-v treats each NAME as a variable name

Return status

Status Reason
0 no error
!=0 invalid option
!=0 invalid combination of options (-v and -f)
!=0 a given NAME is read-only

unset -v EDITOR

unset -f myfunc1 myfunc2

This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information
You could leave a comment if you were logged in.
  • commands/builtin/unset.1294120705.txt
  • Last modified: 2011/01/04 05:58
  • by thebonsai