src_host='xxx'
src_mysql_user='xxx'
src_mysql_passwd='xxx'
users='xxx xxxx'
host='10.xxx.%.%'
for user in ${users}
do
mysql -u ${src_mysql_user} -p${src_mysql_passwd} -h ${src_host} -e "SHOW GRANTS FOR '"${user}"'@'"${host}"';" > ${user}@${host}_privileges.sql
done