标签:done user base ase $2 mys code soc word
MYSQL_BASE=/opt/mysqlfor i in ${MYSQL_LOGIN} -N -e "select user,host from mysql.user;"| awk ‘{print "‘\‘‘" $1 "‘\‘‘" "@" "‘\‘‘" $2 "‘\‘‘"}‘
; do ${MYSQL_LOGIN} -N -e " show grants for $i;"; done
#里面涉及了awk print单引号和双引号的小技巧
awk ‘{ print "‘\t‘"}‘ #单引号
awk ‘{ print "\""}‘ #双引号
标签:done user base ase $2 mys code soc word
原文地址:https://blog.51cto.com/accole/2468383