shell/处理用户输入/隐藏方式读取数据.sh

9 lines
214 B
Bash
Raw Normal View History

2016-05-13 21:42:54 +08:00
#!/bin/bash
# hiding input data from monitor
read -s -p "Please enter your password: " pass
#添加了-s选项之后不会自动换行不添加-s 会自动换行
echo
echo "Is your password really $pass?"