anyone has any idae how do i clear the value in a variable in BASH?
So far I come across "Clear-variable", however it can only clear a "Local" and "Global" variable. I'm trying to clear a self-declared variable.
Anyone has any suggestions?
anyone has any idae how do i clear the value in a variable in BASH?
So far I come across "Clear-variable", however it can only clear a "Local" and "Global" variable. I'm trying to clear a self-declared variable.
Anyone has any suggestions?
$ a="1234"
$ echo $a
1234
$ unset a
$ echo $a
$
Thanks jay!
You can set it to empty
a="1234"
$echo $a
1234
$ a=
$ echo $a
$
Thanks for all your response!
But can i check with you guys, is it possible to clear the value in a 2d array with 2 variables as its value? E.g.
${a[$j$i]}