I just tested the script and unfortunately it is currently not working. No MN list is printed.
If I print the MN list with the simple command
dash-cli masternode list full
it works.
But with the script the output is empty. Anything significantly changed in the last year?