bash
didn't go into an infinite loop. You're running the yes
program, whose description is:
yes
- output a string repeatedly until killed
y
is the default string that it prints. The purpose is to pipe it to a command that's going to ask lots of confirmation questions, so you can give the same answer to all of them. E.g.
yes | ./configure
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…