typing in 'rm' in any script I write scares the bejeebus out of me. I tend to write 'echo rm' so I get a chance to review while testing to catch this specific type of issue.
Instead of deleting anything, my scripts usually mv files to a timestamped folder under /tmp. In practical terms, it’s rarely a noticeable difference in performance or disk usage. Also makes scripts easier to debug when you can inspect transient artifacts.
In case you're interested, I have adopted a pattern that works for me in bash (I don't use zsh so caveat shellator)
N=${N:-} # if you use (-u)
$N rm ./whatever
and then you can exercise the script via
N=echo ./something-dangerous
but without the N defined it will run it as expected. More nuanced commands (e.g. rsync --delete --dry-run which will provide a lot more detail about what it thinks it is going to do) could be written as `rsync --delete ${N:+--dry-run}` type deal
Can use -i to confirm deletions also, to not have to edit and re-do the command. The downside is being asked for everything individually rather than confirming one (big) list, so not sure if this fits your use-case
It would be fun if we could define planets with our own materials, like bananas (influenced by xkcd), diamonds or whatever other silly substance we like :-)
very very cool, its also so rare these days to see the scientific crowd bother building windows installers, now people whose only skillset is using microsoft word and cheating in games can get a glimpse of what modern compute is capable of, hopefully inspire some of them to think beyond badly formatted text documents.
Although at this point they are more likely to call it science fiction because they all know the earth is flat.
https://github.com/pavelsevecek/OpenSPH
includes an old Debian package you can install (although for Debian 10, and doesn't work on recent Ubuntu/Mint installs either)...
Or can anyone on HN give me any hints on a valid flow chart
Dead Comment
https://github.com/whyboris/Gravity-Wars
I just noticed there's Orbit Outlaws[2] from the same developer, which builds on the same concept (for better or worse), but is also abandoned.
[1]: https://store.steampowered.com/app/426930/Moonshot/
[2]: https://store.steampowered.com/app/1319100/Orbit_Outlaws/
This looks super fun.
Edit: I'm loving the explosion-revenge last-ditch effort to counterstrike when hit. Fantastic concept.
I see what you did here.
Deleted Comment
Although at this point they are more likely to call it science fiction because they all know the earth is flat.