unlock-sqlite-db.zsh: Add script for fixing locked database files

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
Anna Schumaker 2023-07-19 15:09:37 -04:00
parent 03255bc333
commit b07b1c2a52
1 changed files with 12 additions and 0 deletions

12
unlock-sqlite-db.zsh Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/zsh
if [[ $# != 1 ]]; then
echo "Usage: $0 [FILE]"
exit 1
fi
backup="$(mktemp)"
mv $1 $backup
cp $backup $1
rm $backup