Why does the following line break the terminal when executed in a non-interactive shell, but doesn't have the same effect when executed in an interactive shell?
for i in {1..10}; do sudo -u testuser echo & done ;wait
I have password-less sudo, so I don't ordinarily get prompted for a password.