Skip to content

Instantly share code, notes, and snippets.

@julienp
Created January 25, 2013 18:31
Show Gist options
  • Save julienp/4636735 to your computer and use it in GitHub Desktop.
Save julienp/4636735 to your computer and use it in GitHub Desktop.
#!/bin/sh
# http://furbo.org/2009/03/03/open-sesame/
# quote $1 so it works with spaces in the app name
if [ -z "$1" ]; then
echo "usage: $0 <app> [ Preferences | <document> ]"
else
app=`ls -1td /Users/julien/Library/Application\ Support/iPhone\ Simulator/6.0/Applications/*/"$1".app`
dir=`dirname "$app"`
if [ "$2" = "Preferences" ]; then
open "$dir/Library/Preferences"
else
open "$dir/Documents/$2"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment