|
|
|
|
|
by jolmg
1674 days ago
|
|
Yup. Nearly everything has tradeoffs. BTW, the problem I mentioned earlier can be avoided by using `< <()`: $ x=1
$ seq 5 | while read n; do (( x++ )); done
$ echo $x
1
$ while read n; do (( x++ )); done < <(seq 5)
$ echo $x
6
Almost makes me wonder what the benefit of preferring a pipe here is. I guess it's just about not having to specify what part of the pipeline is in the same shell. |
|