Usually, in bash the command "read" is used for "press any key to continue" scenarios:
Code: Select all
read -p "press any key..."
Code: Select all
while read LINE; do
...
read -p "press any key"
done < $FILE
[SOLUTION]
Use a for loop with "cat" instead of while/read:
Code: Select all
for LINE in $(cat $FILE); do
...
read -p "press any key"
done
NOTE: Versions that use a different pipe than stdin can be found in the site, linked below.
Links: