read
Reads a line from the user.
Syntax
read variable
Description
Takes input from the keyboard and assigns it to a variable. Use -p to show a prompt message.
Example
Loading editor…
This language is for reference/learning only — copy the code and try it in your own environment.
Expected output
(depending on the entered name) Hello Alex
When to use?
Interactive scripts.