在Linux Shell下读取用户输入可以使用read命令。
用法:
echo "Input something:"
read input
echo "Your input is: $input"
运行结果:
Input something:
hahaha
Your input is: hahaha
本文介绍在 Linux Shell 下如何使用 read 命令来读取用户的输入,并通过一个简单的示例展示了 read 命令的基本用法。
在Linux Shell下读取用户输入可以使用read命令。
用法:
echo "Input something:"
read input
echo "Your input is: $input"
运行结果:
Input something:
hahaha
Your input is: hahaha
6058
701
2097

被折叠的 条评论
为什么被折叠?
