---
title: "Useful Bash Scripts"
type: post
url: "https://robotpaper.ai/useful-bash-scripts/"
canonical: "https://robotpaper.ai/useful-bash-scripts/"
markdown_url: "https://robotpaper.ai/useful-bash-scripts.md"
published: "2025-10-23T09:07:39.000+00:00"
updated: "2025-10-23T09:07:39.000+00:00"
tags: ["Developer-Experience"]
author: "Roy Osherove"
author_links: ["https://robotpaper.ai", "https://x.com/royosherove", "https://www.linkedin.com/in/osherove/", "https://forms.gle/jQSx5KoXvrVA1JCK7", "https://robotpaper.ai/about-roy.md"]
description: "A great collection of small, useful bash scripts I found, like boop for audible test results and nato for spelling strings out loud. Here are my favorites."
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original post)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Useful Bash Scripts

I don't know when or how I'll use all of these, but I *love* [the scripts listed here](https://evanhahn.com/scripts-i-wrote-that-i-use-all-the-time/).

Some that caught my eye:

[`boop`](https://codeberg.org/EvanHahn/dotfiles/src/commit/843b9ee13d949d346a4a73ccee2a99351aed285b/home/zsh/.config/zsh/aliases.zsh#L53-L61) (an alias, not a shell script) makes a happy sound if the previous command succeeded and a sad sound otherwise. I do things like `run_the_tests ; boop` which will tell me, audibly, whether the tests succeed. It’s also helpful for long-running commands, because you get a little alert when they’re done. I use this *all the time*.

[`nato bar`](https://codeberg.org/EvanHahn/dotfiles/src/commit/843b9ee13d949d346a4a73ccee2a99351aed285b/home/bin/bin/nato) returns `Bravo Alfa Romeo`. I use this most often when talking to customer service and need to read out a long alphanumeric string, which has only happened a couple of times in my whole life. But it’s sometimes useful!

[`murder foo` or `murder 1234`](https://codeberg.org/EvanHahn/dotfiles/src/commit/843b9ee13d949d346a4a73ccee2a99351aed285b/home/bin/bin/murder) is a wrapper around `kill` that sends `kill -15 $PID`, waits a little, then sends `kill -2`, waits and sends `kill -1`, waits before finally sending `kill -9`. If I want a program to stop, I want to ask it nicely before getting more aggressive. I use this a few times a month.

[`tryna my_command`](https://codeberg.org/EvanHahn/dotfiles/src/commit/843b9ee13d949d346a4a73ccee2a99351aed285b/home/bin/bin/tryna) runs `my_command` until it succeeds. [`trynafail my_command`](https://codeberg.org/EvanHahn/dotfiles/src/commit/843b9ee13d949d346a4a73ccee2a99351aed285b/home/bin/bin/trynafail) runs `my_command` until it fails. I don’t use this much, but it’s useful for various things. `tryna wget ...` will keep trying to download something. `trynafail npm test` will stop once my tests start failing.

[`ds-destroy`](https://codeberg.org/EvanHahn/dotfiles/src/commit/843b9ee13d949d346a4a73ccee2a99351aed285b/home/bin/bin/ds-destroy) recursively deletes all `.DS_Store` files in a directory. I hate that macOS clutters directories with these files! I don’t use this often, but I’m glad I have it when I need it.

---

## About the author

**Roy Osherove** - Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

-   [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
-   [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
-   [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
-   [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
-   [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
-   [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

-   X: [https://x.com/royosherove](https://x.com/royosherove)
-   LinkedIn: [https://www.linkedin.com/in/osherove/](https://www.linkedin.com/in/osherove/)

### Contact

-   Contact form: [https://forms.gle/jQSx5KoXvrVA1JCK7](https://forms.gle/jQSx5KoXvrVA1JCK7)

### License

Content on robotpaper.ai is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse, quote and adapt with attribution (Roy Osherove, link to the original post).

More about Roy and his other sites and projects: [https://robotpaper.ai/about-roy.md](https://robotpaper.ai/about-roy.md)
