1

Requesting user input while reading file line by line

view story
linux-howto

http://unix.stackexchange.com – For class I need to write a Bash script that will take the output from ispell and when I try and request user input inside the while loop it just saves the next line of the file as the user input. How could I go about requesting user input in the while loop? #!/bin/bash #Returns the misspelled words #ispell -l < file #define vars ISPELL_OUTPUT_FILE="output.tmp"; INPUT_FILE=$1 ispell -l < $INPUT_FILE > $ISPELL_OUTPUT_FILE; #echo a new line for give space between command #and the output generated echo ""; while read line; do echo "'$line' is misspelled. Press "Enter" to keep"; (HowTos)