-
-
Save holys/4516698 to your computer and use it in GitHub Desktop.
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/bash | |
read -p "please input a file name:" file | |
cat <<- MENU | |
d or D:delete file | |
s or S:show file detail infomation | |
q or Q:quit | |
MENU | |
read -p "input your option:" option | |
case "$option" in | |
d|D) echo "delete $file" | |
rm "$file" ;; | |
s|S) ls -l "$file" ;; | |
q|Q) exit 0 ;; | |
*) echo "invalid option" | |
exit 1 ;; | |
esac | |
exit 0 |
Author
holys
commented
Jan 12, 2013
感觉用gist做笔记什么的挺不错的! 随时记录 ! 还可以修改, 还有代码高亮!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment