i always want to see if a program has a saved status so i wrote this to help me

macbookpro:~ rcg$ checksaved pixelmator
/Users/rcg/Library/Saved Application State/com.pixelmatorteam.pixelmator.savedState

script is inside

 

checksaved ()
{
name=$1;
filesaved=$(ls -l "$HOME/Library/Saved Application State/" | grep -i "$name" | awk '{print $9}');
echo ""$HOME/Library/Saved Application State/"$filesaved"
}

bars