Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link
httphttps
http
https
replaced http://serverfault.com/ with https://serverfault.com/
Source Link

-- which I did not find a way for to encapsulate it within a function -- I'd like to add a simple version, which is partly based on Richard HansenRichard Hansen's answeranswer, but does address also the pitfall that occurs with an empty array=():

-- which I did not find a way for to encapsulate it within a function -- I'd like to add a simple version, which is partly based on Richard Hansen's answer, but does address also the pitfall that occurs with an empty array=():

-- which I did not find a way for to encapsulate it within a function -- I'd like to add a simple version, which is partly based on Richard Hansen's answer, but does address also the pitfall that occurs with an empty array=():

improve fomratting as suggested, but still representing the foreign code as a quote
Source Link
a; # is not declared a=; # is declared a="foo"; # is declared a=(); # is declared a=(""); # is declared unset a; # is not declared a; # is unset a=; # is not unset a="foo"; # is not unset a=(); # is not unset a=(""); # is not unset unset a; # is unset 
a; # is not declared a=; # is declared a="foo"; # is declared a=(); # is declared a=(""); # is declared unset a; # is not declared a; # is unset a=; # is not unset a="foo"; # is not unset a=(); # is not unset a=(""); # is not unset unset a; # is unset 
a; # is not declared a=; # is declared a="foo"; # is declared a=(); # is declared a=(""); # is declared unset a; # is not declared a; # is unset a=; # is not unset a="foo"; # is not unset a=(); # is not unset a=(""); # is not unset unset a; # is unset 
a; # is not declared a=; # is declared a="foo"; # is declared a=(); # is declared a=(""); # is declared unset a; # is not declared a; # is unset a=; # is not unset a="foo"; # is not unset a=(); # is not unset a=(""); # is not unset unset a; # is unset 
Source Link
Loading