0

i want to echo content as following

GRANT SELECT, PROCESS, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'zabbix_agent'@927.0.0.1';

but echo \\\0471 will get 9 ,I do want this ,how can I do ?

echo -e "GRANT SELECT, PROCESS, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO \\047zabbix_agent\\047@\\047127.0.0.1\\047;"
GRANT SELECT, PROCESS, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'zabbix_agent'@927.0.0.1';
anubhava
  • 761,203
  • 64
  • 569
  • 643
user1208081
  • 1,057
  • 4
  • 15
  • 29
  • this is a different thing ,actually ,the command is send by salt to execute on remote host. the whole command is # salt 'yunpei_db1' cmd.run 'echo -e "create user \\047zabbix_agent\\047@\\047127.0.0.1\\047 identified by \\047password\\047;GRANT SELECT, PROCESS, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO \\047zabbix_agent\\047@\\047127.0.0.1\\047;" ' this command will create a local account on a remote mysql . – user1208081 Mar 04 '19 at 07:35
  • `927.0.0.1` this is a very strange ip address, I think you meant `127.0.0.1` – KamilCuk Mar 04 '19 at 07:59
  • \\0471 -> 9. what I want is '1 ,not 9 – user1208081 Mar 04 '19 at 08:31

0 Answers0