Ung, I wish #bash had some sort of "redirect the stdout of a process to this file, but only if the process exits successfully'
(`sponge(1)` is a useful tool here..)
I suppose "mktemp blah / command > tempfile / mv tempfile dest file" is as good as I'll get...
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!