On p. 15 of the notes, a syntax for variable names is given
which implies that _ (underscore) alone is a valid variable name.
In fact, it is valid, but it is also reserved by bash, and has the
following special meaning:
$_ or ${_}
At shell startup, set to the absolute pathname used to invoke
the shell or shell script being executed as passed in the envi-
ronment or argument list. Subsequently, expands to the last
argument to the previous command, after expansion. Also set to
the full pathname used to invoke each command executed and
placed in the environment exported to that command. When check
ing mail, this parameter holds the name of the mail file cur-
rently being checked.
-- bash(1) man page
-Andrew
In defence of the course notes, it does state:
Some identifiers are reserved (e.g., if, while), and hence, keywords.
which varies depending on the shell. So the name "_" in bash is reserved.
I checked, and I can create a variable named "_" in the bourne shell (sh).