Skip to content

Instantly share code, notes, and snippets.

@kurozumi

kurozumi/count.sh

Last active Aug 9, 2016
Embed
What would you like to do?
【MySQL】定期的にテーブルの行数を保存する
#!/bin/bash
RESULT=$(mysql -u username -ppassword --skip-column-names -e "SELECT count(*) FROM table" database)
echo $(date '+%Y/%m/%d %H:%M:%S') $RESULT >> $HOME/count.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment