Search
Published on 2025-12-29 11:05
Here's a simple bash script that searches files for keywords.
I use this script to power the search on this gopher hole.
You can test the search script from my blog or via the link below:
- Features
🔦 Searches
🖨️ Prints results
🗨️ Shows snippets for each result
Be aware, if you want to use this script there are 2 things you
should keep in mind:
- my blog posts are contained in the "blog" folder. Each post has
it's own folder named as it's slug: /blog/slug-of-the-post/
- the script searches only the folders inside the blog folder
(-mindepth 2), and only files named as: gophermap
❗ Make sure to adapt to your blog structure ❗
Code
And now, the script:
TEXT Search script
DIR Back to fun stuff
DIR Back to my home page