On Mon, Oct 30, 2017 at 12:05:51AM -0400, Eli Barzilay wrote: > Again, `unset` has different expectations, because it seems like it > would be a special construct
Only to you, and only because you brought in some expectations from a different language. > -- since it's dealing with *lvalues*. wooledg:~$ man bash | grep -i lvalue wooledg:~$ Concepts from other languages do not work the same way in bash. Here's a paragraph from bash(1): The unset builtin is used to destroy arrays. unset name[subscript] destroys the array element at index subscript. Negative subscripts to indexed arrays are interpreted as described above. Care must be taken to avoid unwanted side effects caused by pathname expansion. unset name, where name is an array, or unset name[subscript], where subscript is * or @, removes the entire array. This has two unquoted instances of name[subscript]. You could put quotes around those to provide better examples. (The man page as a whole is quite short on examples.)