De acordo com a página de manual do sudo:
-l, --list If no command is specified, list the allowed (and forbidden)
commands for the invoking user (or the user specified by the
-U option) on the current host. A longer list format is used
if this option is specified multiple times and the security
policy supports a verbose output format.
If a command is specified and is permitted by the security
policy, the fully-qualified path to the command is displayed
along with any command line arguments. If command is
specified but not allowed, sudo will exit with a status value
of 1.
então isso vai se resumir a
if sudo -l -U $USER shutdown > /dev/null
then
## $USER can
else
## $USER cannot
fi
Como apontado por Muru, use -U $USER
ou -U $USERTOTEST
ou nada, dependendo da sua necessidade.