You have a couple of things here which are interacting to give you your unexpected result. I've added a few more comments which may make the code a little more robust.
If you correct the first two, the code should work.
After Compline,
Zaxo
In reply to Re: Sending EOF to pipe
by Zaxo
in thread Sending EOF to pipe
by smgfc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |