OSX 隐藏桌面图标SHELL脚本

OSX 隐藏桌面图标SHELL脚本

#!/bin/sh
echo 1.隐藏
echo 2.显示
echo 3.退出
echo Please choose:
read -n 1 M
#下面一行是换行
echo
#echo M=$M
if [ “$M” = “1” ]
then
defaults write com.apple.finder CreateDesktop -bool FALSE;killall Finder
 echo 桌面图标已隐藏
elif [ “$M” = “2” ]
then
defaults delete com.apple.finder CreateDesktop;killall Finder
 echo 桌面图标已恢复
elif [ “$M” = “3” ]
then
 echo 退出
else
 echo Error
 echo 输入错误!
fi

Post navigation