I write a lot of bash scripts to automate different facets of developer workflows, and the user interface of a script is a place I try to pay attention to.
It’s easy to write scripts which do the right thing, but it’s harder to write scripts which will be sturdy and insulated from bitrot inflicted as the architecture changes around them.
Adequate feedback is also really helpful. How do I know the script did the right thing?
One of the functions I think adds a lot to the output of a script is this little gem which prints an <hr> in the console:
It looks like this in the console: