Hi,
I fire the script on a synology nas with latest DSM operating system and it seems that mysqlshow command is not part of the mariadb package.
Is there any chance you would check for mysqlshow or mariadb-show existence, as it seems to be a breaking change from latest mariadb versions:
https://mariadb.com/kb/en/mysqlshow/