Foreword: I am a complete bash noob.
I want to write a simple script to switch AppleShowAllFiles to my mac.
I think something like this:
#!/bin/bash
if defaults read com.apple.finder AppleShowAllFiles == TRUE
then
defaults write com.apple.finder AppleShowAllFiles FALSE
else
defaults write com.apple.finder AppleShowAllFiles TRUE
fi
killall Finder
This does not work, but I am sure that one of you could bash exit in 1 second; start beating and helping a lost soul!
thank.
James source
share