Skip to content
Advertisement

Bash script does not wait for user to enter response

I am trying to read a text file (line by line) and take user response in a while loop. However, the script does not wait to take input. Instead, it just prints all the text to screen.

JavaScript

The script only prints alternate text lines from the file (Please refer to the image below).

Output

Advertisement

Answer

This worked for me:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement