Reputation: 93
How can i make a bash script for this?My command is :
mysql -h(sample) -u(sample) -p -e "insert into databasename.tablename select count( * )from information_schema.processlist;"
Truly yours,
Joey
Upvotes: 0
Views: 219
Reputation: 23916
-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
Upvotes: 1