Bourne shell: how should I terminate a script from within a while loop reading from a pipe?

前端 未结 0 1221
野的像风
野的像风 2021-01-22 21:26

Here is /bin/sh behaviour that surprised me, "exit" failing to exit:

$ cat sh_exit_from_while_pipe 
#!/bin/sh
echo foobar | while read blabla
do
    ech         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题