<div dir="ltr"><br><div>I have something like this:</div><div>while read -r -a Line; do</div><div>    …</div><div>    …</div><div>done << "$SomeFile"</div><div><br></div><div>Since my script are going to do some dangerous things (deleting files – hopefully the right ones), I first want to test it by omitting the dangerous lines and adding a lot of echo lines, letting me know the values of all important variables.</div>
<div>$SomeFile has a few thousands of lines, so I don't want to go through it all, but I would like to see the result of maybe the first 20 lines or so.</div><div><br></div><div>So I want the script to stop before looping, letting me study all the variables before going to the next line in the file.</div>
<div><br></div><div>But I figure that if I use ”read” to do that, that ”read” command would also be fed with $SomeFile, wouldn't it?</div><div><br></div><div>So I want something like this:</div><div><div>while read -r -a Line; do</div>
<div>    …</div><div>    …</div><div>    echo "Press any key to continue"</div><div>    SomeCommand</div><div>done << "$SomeFile"</div><div><br></div><div><br></div></div></div>