While loop stops reading after the first line in Bash
The problem is that do_work.sh runs ssh commands and by default ssh reads from stdin which is your input file. As a result, you only see the first line processed, because the command consumes the rest of the file and your while loop terminates. This happens not just for ssh, but for any command that … Read more