>>220
>>210 の最終行で named pipeの文法使ってるから #!/bin/bashにする必要がある。
#!/bin/sh で起動すると(たとえ実体はbashでも) sh互換モードになって named pipeの文法がエラーになる。