There are various trivial command-line tools which I (have had to) create because of various reasons. Below are some of them:
I didn't want to write this, but couldn't find any existing cli tool on CPAN or Debian. Since I put reminders on my ~/.bash_profile and I open many many terminals in a day, I needed a way to run some scripts just once a day. It's surprising that I couldn't find a tool to let me do it easily, and I hope someone can correct me on this.
This began when I wanted to do something like:
if [[ "$OFFLINE" =="" ]]; then do-some-thing-that-needs-internet ...; done
in dist.ini to be run by Dist::Zilla::Plugin::Run. But of course you'll have to write something like this instead for it to work:
bash -c 'if [[ "$OFFLINE" =="" ]]; then do-some-thing-that-needs-internet ...; done'
which will get even more unreadable when you nest it or combine it with another command (like norepeat). And it does not work on Windows without bash. So exec-if-env (and exec-if-not-env) was born. This allows you to simplify your command line, e.g.:
norepeat --period daily -- exec-if-not-env OFFLINE do-some-thing-that-needs-internet
check-yaml and check-json
Some of my applications use YAML config file, some use JSON. And of course, users invariably write/edit YAML and JSON with syntax errors in them. Especially YAML. I prefer to tell my users about check-yaml and check-json rather than instructing them to type something like:
% perl -MYAML -E'Load(~~<>)' /path/to/some/file.yaml
What are some of the trivial tools you have created?