1。read -s -p "input passwd:" passwd #
-s:输入密码,不会在屏幕 显示 。
-p:赋值给 passwd变量。。。
-t 5:五秒后自动退出。
-n1:输入一个字符自动退出。(适合 [Y/N])
读行:
cat test | while read line //cat 命令的输出作为read命令的输入,read读到的值放在line中
do
echo "Line $count:$line"
count=$[ $count + 1 ] //注意中括号中的空格。
done
echo "finish"
shell 常用命令
猜你喜欢
转载自jacklin2015.iteye.com/blog/2262228
今日推荐
周排行