Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图将文本保存在变量中。但是该点将被翻译为目录。
M2_1="GRANT USAGE ON *.* TO '$USER'@'%' IDENTIFIED BY PASSWORD '$MYSQL_PASSWORD';"
我怎么能逃脱*.*?
*.*
示例输出应为:
GRANT USAGE ON *.* TO 'web88'@'%' IDENTIFIED BY PASSWORD '123456789';"
这个对我有用。以后使用它时,您可能没有引用该变量:
M2_1="GRANT USAGE ON *.* TO '$USER'@'%' IDENTIFIED BY PASSWORD '$MYSQL_PASSWORD';" echo "$M2_1"