Bash mine script, please
- by HomelyPoet
The script, in and of its self, is fairly self-explanatory.
Use if You so desire; any and all criticism wouldst be appreciated, as wouldst any suggestions for improvement.
First iteration was writ upon OS X 10.5.8 Leopard, current iteration was run upon OS X 10.6.4 Snow Leopard with Safari 5.0.2 (6533.18.5).
Also, any illumination as to why the first line ' if [ -f ] ' works, but ' if [ -f ~/Library/Safari/LocalStorage/*.localstorage ] ' generates an error? [yes, I am a bit of a Noob]
Code:
#! /bin/bash
# SafariClear0.0.6
if [ -f ]
then
cat /dev/null > ~/Library/Safari/LocalStorage/*.localstorage
rm -f ~/Library/Safari/LocalStorage/*.localstorage
fi
if [ -f ~/Library/Safari/LocalStorage/*.localstorage ]
then
echo "Oy vey!"
fi
cd ~/Library/Safari/
cat /dev/null > WebpageIcons.db
cat /dev/null > TopSites.plist
cat /dev/null > LocationPermissions.plist
cat /dev/null > LastSession.plist
cat /dev/null > History.plist
echo "Clear"
exit