I have a filter like:
#!/bin/bash
while
read line
do
echo $line | tr "B" "b"
done
I have a client that use that filter using coproc like:
#!/bin/bash
coproc ./filter
echo Bogus >&"${COPROC[1]}"
cat <&"${COPROC[0]}"
Now the client does not exit. I have to use Ctrl + C to exit.
I want the client to exit when it reach the last line.
How to achieve that?