unset (built-in Bash command)

Content

 

Data

License: GNU GPLv3 +
Version number: GNU Bash 5
Developer / owner: Free Software Foundation Inc.

Short description:

The manual page and help for the unset built-in Bash command. The unset command is a tool for deleting the values ​​and properties of shell variables and functions.

 

 

Man page output

man bash
[...]
       unset [-fv] [-n] [name ...]
              For  each name, remove the corresponding variable or function.  If the -v option is
              given, each name refers to a shell variable, and that variable is  removed.   Read-
              only  variables  may not be unset.  If -f is specified, each name refers to a shell
              function, and the function definition is removed.  If the -n  option  is  supplied,
              and  name  is a variable with the nameref attribute, name will be unset rather than
              the variable it references.  -n has no effect if the -f option is supplied.  If  no
              options  are  supplied,  each name refers to a variable; if there is no variable by
              that name, any function with that name is unset.  Each unset variable  or  function
              is  removed  from  the  environment  passed  to  subsequent  commands.   If  any of
              COMP_WORDBREAKS, RANDOM, SECONDS, LINENO, HISTCMD, FUNCNAME,  GROUPS,  or  DIRSTACK
              are unset, they lose their special properties, even if they are subsequently reset.
              The exit status is true unless a name is readonly.
[...]

 

 

Help output

unset --help
unset: unset [-f] [-v] [-n] [név ...]
    Parancsértelmező-változók és -függvények értékeinek és jellemzőinek törlése.
    
    Minden NÉV nevű függvény vagy változó törlése.
    
    Kapcsolók:
      -f        minden NÉV függvény
      -v        minden NÉV változó
      -n        minden NÉV névhivatkozás, és a változó törlése az általa
                hivatkozott változó helyett
    
    Kapcsolók nélkül az unset először változót, sikertelenség esetén függvényt
    próbál törölni.
    
    Néhány változót nem lehet törölni, lásd „readonly”.
    
    Kilépési kód:
    Sikerrel tér vissza, kivéve ha hibás kapcsolót kap, vagy egy NÉV csak
    olvasható.

 

Related Content