I hate to assume your motives are bad-hearted, but I'm
not sure if you're trolling or something?

On 01/17/24 07:00PM, 201009-suckl...@planhack.com wrote:
> Use files.
> 
> ./program-cli | (
> read -r
> printf "%s\n" "$REPLY"  > /tmp/a
> ) > /tmp/b
> fooify /tmp/a
> barify /tmp/b
> ....
> 

To correct the above program:

```
./program-cli | (
read -r
printf "%s\n" "$REPLY"  > /tmp/a
cat
) > /tmp/b
fooify /tmp/a
barify /tmp/b
```

If you don't add `cat`, the body of the output is consumed by the dead
subshell & you'd end up with nothing to barify, and that's a fact.

but why add cat if you can barify right there?


to further correct the above program, assuming barify reads from stdin:

```
./program-cli | (
read -r
printf "%s\n" "$REPLY"  > /tmp/a
barify
) > /tmp/b
fooify /tmp/a
```

"Use files" - I will never forget this.

Jeremy

Reply via email to