shell之echo

#!/bin/sh
#read name
#echo "$name It is a test" #read命令从标准的输入中读取一行,并把输入方的每个字段的值指定给shell变量
#echo "OK! \n"
#echo -e "OK! \n" # -e 开启转义
#echo -e "ok! "
#echo "It is a test !!!" > myfile
#echo `date`
#read firststr secondstr
#echo "第一个参数:$firststr;第二个参数:$secondstr"
read -p "请输入一段文字:" -n 6 -s password
echo -e "\npassword is $password"
#-p 输入提示文字
#-n 输入字符长度限制(达到6位,自动结束)
# -t 输入限时
#-s 输入隐藏内容

资源来自:http://www.runoob.com/

猜你喜欢

转载自www.cnblogs.com/qtclm/p/10314511.html
今日推荐