- Published on
Short engineering note
Today I Learnt: Read user input in bash
- Authors

- Name
- Mehdi Akiki
Note · Engineering notes
Prompt and capture user input:
read -p "Your name: " name
echo "Hello, $name"
Tip: use -r to avoid backslash escapes and -s for silent (password) input.