linux - 如何制作 bash 脚本

标签 linux bash

我如何为此制作一个 bash 脚本?我的命令是:

mysql -h(sample) -u(sample) -p -e "insert into databasename.tablename select count( * )from information_schema.processlist;"

真正的你,

乔伊

最佳答案

-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

关于linux - 如何制作 bash 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9028133/

相关文章:

linux - qemu makefile错误找不到我知道的库

linux - awk 没有按预期工作

bash - 根据第一个/最后一个记录的最大/最小值对文件进行成对修剪

mysql - 如何将日志文件记录到mysql数据库

bash - Mac 终端上的 PyFERRET 命令不起作用

python - 获取 Ubuntu 或 Python 中打开的目录/浏览器的路径或 url?

php - Ubuntu linux apache2 cronjob 不调用 php 文件

linux - 如何将源文件中的文本复制并粘贴到新文件(仅数字)?

prctl() 的正确使用方法

bash - echo 以特殊字符为元素的组合