by danstewart_ · 2y ago · 0 comments
I feel it’s safer for scripts that have irreversible (or difficult to reverse) actions.
Instead of
myprog # see what would happen
myprog --commit # alright, do it
You do myprog # see what would happen
myprog | sh # alright, do it
But if you want to change something: myprog > x
vi x
cat x | sh
And if you just want to run everything in parallel: myprog | parallel -j 16