pl.kpherox.dev

pl.kpherox.dev

redirection input と pipe で readが違う
```
for w in {0..2}; do sleep $w && echo 'echo a; read b; echo $b'; done | bash
>> a
>> echo a; read b; echo $b
>> a
>>
```

```
bash <(for w in {0..2}; do sleep $w && echo 'echo a; read b; echo $b'; done)
>> a
>> input2
>> input2
>> a
>> input2
>> input2
>> a
>> input3
>> input3
```
replies
2
announces
1
likes
0

pipeだとsleepの後のechoがreadに渡されたけどredirectionはそんなことない。えぇ?

input1がinput2になってるけどまぁええわ