Skip to content

Instantly share code, notes, and snippets.

@larsks
Created February 6, 2024 04:23
Show Gist options
  • Select an option

  • Save larsks/ee1a084aa8ee177f858d9a25c4d4d5d4 to your computer and use it in GitHub Desktop.

Select an option

Save larsks/ee1a084aa8ee177f858d9a25c4d4d5d4 to your computer and use it in GitHub Desktop.
#!/bin/sh
: > columns.out
last_cksum=""
for i in {1..100}; do
mysqldump --databases example -psecret 2>/dev/null | grep column_ > columns.out
this_cksum=$(sha256sum columns.out)
if [[ $this_cksum != $last_cksum ]]; then
echo "Column order changed!"
cat columns.out
fi
last_cksum=$this_cksum
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment