4 ms·
You don't need the dash. This is enough: cat | grep "something"
by gnosis 15y ago
You don't need the dash. This is enough:
cat | grep "something"
- comex 15y agoOr just grep "something"
- veyron 15y agoIn some older versions of bash, when dealing with process substitution, you actually needed the dash. For example get_data | tee >(cmd) get_data | tee >(cat | cmd) would fail but get_data | tee >(cat - | cmd) would succeed.
- 16s 15y agoWhen I was young, I used cat and grep like that until an old Unix sys-admin remarked "What a gratuitous use of cat!". At the time, I did not understand what he meant, but now I do. So whenever I see cat and grep used like this, I think back to that lesson I learned.