我如何为此制作一个bash脚本?我的命令是:
mysql -h(sample) -u(sample) -p -e "insert into databasename.tablename select count( * )from information_schema.processlist;"
真的是你的,
乔伊
答案 0 :(得分:1)
-bash-4.2$ cat > my_bash_script << "EOF"
> #!/bin/bash
>
> mysql -h(sample) -u(sample) -p -e "insert into databasename.tablename select count( * )from information_schema.processlist;"
> EOF
-bash-4.2$ chmod 755 my_bash_script