shell读取终端输入

用read 关键字

read -p “Enter input:” var
-p 的作用是输出后面的字符串作为提示。
echo $var