To accept input in shell script, read command is used.
The following program shows the working of read command
#!/bin/sh echo What is your name? read name echo Good Morning $name
Let’s check the output
What is your name? User Good Morning User
As you can see that using the read command, the shell script is blocked until the user input is entered and the return key pressed.