Linux 入门与掌握Bash语言(第2版)
发布时间
阅读量:
阅读量
1 read 从键盘读取变量的值

read 后面不带变量,那么默认会给REPLY变量赋值


#!/bin/bash
echo -n "请输入你的名字:"
read name
echo "欢迎您 $name"
echo "----------------"
echo -n "请输入你的名字2:"
read
echo "欢迎您 $REPLY"

还没有任何评论哟~
