Skip to content

Instantly share code, notes, and snippets.

@daniellockyer
Created January 8, 2021 21:35
Show Gist options
  • Save daniellockyer/9ee6907488b3fc54cbaa0ef2cb646b27 to your computer and use it in GitHub Desktop.
Save daniellockyer/9ee6907488b3fc54cbaa0ef2cb646b27 to your computer and use it in GitHub Desktop.
sqldiff-watch.sh
#!/bin/bash
DB_FILE=$1
DB_FILE_COPY=$2
while [ 1 ]; do
if [[ -f "$DB_FILE_COPY" ]]; then
sqldiff $DB_FILE_COPY $DB_FILE
fi
cp $DB_FILE $DB_FILE_COPY
sleep 10
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment