📜  bash 获取用户输入 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:22.238000             🧑  作者: Mango

代码示例2
#!/bin/bash
### Simple bash script to ask a user for their name
# First, echo the question
echo Hello, what is your name?
# Next, get the user input
read varname
# Finally, echo the response using the users input that we got in the previous step
echo It\'s nice to meet you $varname