snippetbashTip
unset — Remove shell variables or functions. More information: <https://www.gnu.org/software/bash/manual/bas
Viewed 0 times
shellcommandremoveunsetclivariablesmorefunctions
Problem
How to use the
unset command: Remove shell variables or functions. More information: <https://www.gnu.org/software/bash/manual/bash.html#index-unset>.Solution
unset — Remove shell variables or functions. More information: <https://www.gnu.org/software/bash/manual/bash.html#index-unset>.Remove variable, or if the variable doesn't exist, remove the function of the same name:
unset {{variable}}Remove variables:
unset -v {{variable1 variable2 ...}}Remove the function:
unset -f {{function_name1 function_name2}}Code Snippets
Remove variable, or if the variable doesn't exist, remove the function of the same name
unset {{variable}}Remove variables
unset -v {{variable1 variable2 ...}}Remove the function
unset -f {{function_name1 function_name2}}Context
tldr-pages: common/unset
Revisions (0)
No revisions yet.