我正在尝试编写一个脚本,该脚本将在 Finder 中显示和隐藏隐藏文件之间切换,但我遇到了错误:
./HiddenFileToggle:第 1 行:[默认值:找不到命令
if [defaults read com.apple.finder AppleShowAllFiles]
then
defaults write com.apple.finder AppleShowAllFiles TRUE
else
defaults write com.apple.finder AppleShowAllFiles FALSE
fi
killall Finder