Last active
June 28, 2023 10:41
-
-
Save lubiepomaranczki/517deb14e336e0e6356aa315d0da467a to your computer and use it in GitHub Desktop.
Script to open sqlite database from iOS simulator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
open_database() { | |
DB_PATH=`lsof -Fn -p $PID| grep "\.sqlite$"` | |
open ${DB_PATH:1} | |
} | |
PID=`pgrep $1` | |
if [ -z "$1" ] | |
then | |
echo "Are you sure you have your app opened on a simulator? 🤔"; | |
else | |
open_database $PID | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment