Created
March 1, 2020 07:44
-
-
Save kazuhisya/ea889b6c9f4bd8121982db7283f41c67 to your computer and use it in GitHub Desktop.
find-dsstore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
find . -name ".DS_Store" -print ; find . -name "._*" -print ; | |
echo "削除しますか? [Y/n]" | |
read ANSWER | |
ANSWER=`echo $ANSWER | tr y Y | tr -d '[\[\]]'` | |
#echo $ANSWER | |
case $ANSWER in | |
""|Y* ) find . -name ".DS_Store" -print -exec rm -r {} ";" ; find . -name "._*" -print -exec rm -r {} ";";; | |
* ) echo "exit";; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment