bash杂记2
不显示终端的输入(stty)
echo "Please enter your password:"
stty -echo
read PASSWORD
stty echo
# 输出刚才输入的内容
echo $PASSWORD
交互式选择(select)
# 江山和美人,你更喜欢那个?
echo "Which do you prefer?"
select result in "beauty" "land"
do
break
done
echo $result
得到当前脚本的绝对路径
echo $(cd "$(dirname "$0")"; pwd)
[code lang=text]小子你妹的![/code]净写些看不懂的东西~
[code lang=text]是呀![/code]