How do I get input in bash?
Answer
To read the Bash user input, we use
the built-in Bash command called read.
…
Program:
Answer
To read the Bash user input, we use
the built-in Bash command called read.
…
Program:
- #!/bin/bash.
- # Read the user input.
- echo “Enter the user name: “
- read first_name.
- echo “The Current User Name is $first_name”
- echo.
- echo “Enter other users’names: “
- read name1 name2 name3.