Just found this script. It allows to output grants in graceful way:
mysql -B -N $@ -e "SELECT DISTINCT CONCAT( 'SHOW GRANTS FOR \'', user, '\'@\'', host, '\';' ) AS query FROM mysql.user" | \ mysql $@ | \ sed 's/\(GRANT .*\)/\1;/;s/^\(Grants for .*\)/## \1 ##/;/##/{x;p;x;}'
My main background for a recent years is MySQL DEV/DBA engineer but I’m also participating in wider range of tasks which could be likely called as DataOps/DevOps tasks. You can see my online CV here: http://catyellow.net