3 ms·
> This is known as idempotency. No? Idempotency is ensuring that calling the same function with the same input N times will have the exact same effect as calli
by vermilingua 3y ago
> This is known as idempotency.
No? Idempotency is ensuring that calling the same function with the same input N times will have the exact same effect as calling it once. Adding this defer does _not_ guarantee idempotency, because it has no impact on the body of the script. You can provide just as much idempotency by running `rm -rf /tmp/$script_dir*` on the first line.
- dizhn 3y agohttps://arslan.io/2019/07/03/how-to-write-idempotent-bash-scripts/ https://arslan.io/2019/07/03/how-to-write-idempotent-bash-sc... I am not sure how autoritative this is but I immediately thought of this post. (It's the vim-go guy)