Linux Shell 读取用户输入

版权声明:本文为博主九师兄(QQ群:spark源代码 198279782 欢迎来探讨技术)原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_21383435/article/details/83050883

在Linux Shell下读取用户输入可以使用read命令。

用法:

echo "Input something:"
read input
echo "Your input is: $input"

运行结果:

Input something:
hahaha
Your input is: hahaha

猜你喜欢

转载自blog.csdn.net/qq_21383435/article/details/83050883