vfarcic / vfarcic.github.io

MIT License
148 stars 115 forks source link

Fix jx workshop copypastables from "cat | sed | tee" to "sed -i" patterns #27

Closed jimklimov closed 4 years ago

jimklimov commented 4 years ago

Hello @vfarcic . As discussed on your enlightening workshop, there are issues with cat FILE | sed | tee FILE pattern that on some systems the later tee first overwrites the FILE and then cat prints the emptiness.

This PR aims to fix most of such cases I found in the jx directory: there is also one triple-pipe with sed '$d' that I did not fix because I did not quite understand it :-) but hopefully it can change into sed -e '$d' -e '$d' -e '$d' -i FILE if you deem fit.

Thanks for the teaching!

vfarcic commented 4 years ago

Thanks a ton