Using bash (on BSD Unix, mac):
#This successfully returns the plist value (YES or NO):
defaults read com.apple.finder.plist AppleShowAllFiles
#This does not work:
myVar=default read com.apple.finder AppleShowAllFiles
echo $myVar
What I am driving at, eventually, is testing the value of AppleShowFiles in a bash script, like so:
if[myVar="YES"]
then
#code block
else
#code block
fi
By the way, I am not sure about the quotation marks… What is it I am doing wrong?