#!/bin/bash
# 練習 case 語句的使用
read -p "Please confirm to formate the disk (Y/N) : " input
case "$input" in
Y|y|[Yy][Ee][Ss]) echo 'Your choosen is Y';;
N|n|[Nn][Oo]) echo 'Your choosen is N';;
*)
echo 'Error!'
echo '一個case之所以用兩個分號結束 , 就是為了支持其中可以執行多條語句'
;;
esac
# 練習 case 語句的使用
read -p "Please confirm to formate the disk (Y/N) : " input
case "$input" in
Y|y|[Yy][Ee][Ss]) echo 'Your choosen is Y';;
N|n|[Nn][Oo]) echo 'Your choosen is N';;
*)
echo 'Error!'
echo '一個case之所以用兩個分號結束 , 就是為了支持其中可以執行多條語句'
;;
esac
2017-01-12
看了TONEY老師的教程,再次讓我浮想連篇。以前和朋友討論芙蓉姐姐、鳳姐,朋友都是一臉鄙夷。我會告訴他們鳳姐是個聰明人,這么炒作絕對有深意。之后芙蓉姐姐發財了,鳳姐出國了。今天再GOOGLE一下芙蓉姐姐已經北京四套房,鳳姐早拿到了綠卡。然后我又想我這么辛苦學技術為了咋呢,去當鳳哥得了……
2016-12-01
-b block(塊設備)
-c charactor(字符)
-d directory(目錄)
-e exit(存在)
-f file(文件)
-L link(鏈接)
-p pipeline(管道)
-S SOCKET(套接字)
-c charactor(字符)
-d directory(目錄)
-e exit(存在)
-f file(文件)
-L link(鏈接)
-p pipeline(管道)
-S SOCKET(套接字)
2016-11-16
[root@zdy-centos sh]# df -h | grep "/$"
/dev/sda5 26G 3.4G 23G 14% /
/dev/sda5 26G 3.4G 23G 14% /
2016-11-15