this post was submitted on 26 Jan 2026
8 points (100.0% liked)

Show & Tell

266 readers
1 users here now

Show & Tell

There appears to be a bug with Lemmy that makes it so you cannot see these posts. If you can't see any posts please send me a message

A community for developers to share personal projects of any size or polish. Anything software/firmware/hardware.. ALL THE WARES!! Side projects, experiments, learning builds, half-finished ideas — all welcome.

Explain what you built, why you built it, and what you learned. Give feedback if you can. Ask for feedback if you want.

Rules

  1. Personal projects only (no company or paid product marketing)
  2. Include context: what it is, what tech you used, what you learned
  3. Be constructive and respectful
  4. No spam or referral farming
  5. Feedback is encouraged, not mandatory
  6. Mark NSFW content clearly
  7. If you see a project you like and you think is cool consider giving it a star!
AI Rules

Guys it's 2026, if you're not using AI at this point you're falling behind. That being said this community is not for showing off AI prompts that you put into gh Copilot or Claude or whatever, all that's showing the world is "hey I know how to make something up and explain it in 20 words while having the expectations of a team who gives a shit! Woow look at me!!".

So do your best to disclose where/how/why you used AI in your code, and if you suspect a project is entirely AI generated slop,, don't engage, don't bully, just let them eat their foot ¯\_(ツ)_/¯.

Icon and Banner were generated using ChatGPT, they're placeholders as of 1/20/26, will replace them with real art soon! https://chatgpt.com/share/696fa8bc-f3e0-8012-b6d7-350a8b53a0e1

founded 1 week ago
MODERATORS
 

The Script

While researching and learning different tasks to do for my personal scripts, I tried keeping my code examples in different files in a directory. It was very unorganized and a bit overwhelming to deal. Instead I started writing a script that functions as a library for all the things I have learned.

The script keeps everything in one spot and it's much easier to work on it. It also acts as a functioning style guide for myself so I can standardize my own future scripts. It's also easy to add code or work on existing code. I usually have it open whenever I am writing something new to use as a quick reference guide.

Some of the features I have worked on include:

  • Making it easier to use POSIX getopts. I can easily add long options. I also made it simple for me to process arguments or deal with conflicting options.
  • Working with simple "arrays" (positional parameters). There's a nice little function that can save the array to a variable which can then be set again to be used in different parts of the script.
  • a Yes/No confirmation function which can accept a y or n character instantly without pressing enter to proceed.
  • A few of examples extracting data from variables using variable expansions
  • An enter password function that works similar to the read -rscommand
  • A couple examples of using the trap command to help reset changes made during a script

I tried my best to make it easy and obvious to understand. I know future me would get annoyed trying to relearn something I worked on before when I am focused on the script I want to write currently.

I'm learning more about the very basic commands of Linux which is why I prefer writing POSIX portable scripts over Bash scripts. Deconstructing read -rs is a good example. I got to play around with the stty command and learn a couple things about terminal settings.

It's a nice, simple and ongoing project. Maybe there is something useful in there for anyone else writing POSIX portable scripts. I would like to learn a little about awk and sed in the future but I haven't found a project yet where that can be used.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here