r/bash • u/[deleted] • Jul 25 '25
r/bash • u/prestonharberts • Mar 10 '25
submission > bib (a Bible reference tool for CLI)
r/bash • u/RyanSummer • Mar 28 '26
Introducing: OneCommand
Hi all,
I wanted to share a pretty large bash script (for macOS) that i've been working on over the past 6 months.
In case you're not familiar with it yet, it's called OneCommand and it's a menu-driven CLI tool for managing macOS - containing hundreds of terminal commands in one.
I've posted about this in some other subreddits but have not yet had the confidence (or bash experience) to post about it here, until now.
I mainly made this for myself in order to consolidate the extensive amount of terminal commands I had stored in text files or as standalone scripts - and while I'm sure many of you probably have your own solutions for this, I figured maybe this could be useful to others here...
This is an open-core product - the free (Lite) version is available on my Github.
The Lite version has some useful functions like Quick Stats, MacOS Preferences, Disk Image Utility, Create Symlink and contains features like saving/remembering file paths, setting script preferences, sudo keep-alive and command-line arguments. So you should be able to easily incorporate your own commands and add your own menu options as needed.
Either way, just wanted to share this here in case others find it useful or want to build off of it. There's also a paid (Full) version on my personal website here with a few more menu options at $14.99 if that's of interest.
Enjoy!
r/bash • u/OussaBer • May 31 '25
Lazyshell - AI cli tool that generate shell commands from natural language
Here is a CLI tool i built to generate shell commands from natural language using AI.
you can learn more here:
github.com/bernoussama/lazyshell
curious what you guys think.
r/bash • u/Independent-Lynx9274 • Sep 18 '26
I made a package manager in bash!
Its called scrapre. It doesn't have any cryptographic verification so note that (please note that) and there is no repository up for it right now cuz I dont really have much need to host one. You cant find it here. (its codeberg btw)
r/bash • u/tanrax • May 15 '26
Building a multi-agent system from scratch: 50 lines of bash + git
en.andros.devr/bash • u/ilyash • Nov 15 '23
submission "if grep" is a bomb that we ignore
r/bash • u/mm_cm_m_km • May 27 '26
submission sharing a folder of markdown with someone who doesnt want to unzip anything
ok so i had this dumb problem. got a folder with like 4 markdown files (readme, sources, conventions file) i wanted to hand to someone on my team. the options were zip it, paste each file one by one, or throw it in a gist.
none felt right for 3kb of text. zip is overkill, gist splits it into one file per url, pasting loses the directory structure entirely.
wrote a thing that packs a directory into one self-describing markdown file. fold ./my-notes gives you my-notes.folded.md. recipient runs unfold my-notes.folded.md and gets the directory back. bash, no deps. the folded file is plain markdown with section delimiters so you can read it in a browser or text editor without unfolding, kinda like a human-readable shar.
(full disclosure: my project, fold.dom.vin)
mainly wondering if anyone else hits this specific annoyance and what you use. i know shar exists but wanted something you can actually read as-is without running it.
r/bash • u/daan0112 • Feb 27 '26
Impossible task
we have a task asking to remove lines in a .txt file when it starts with a # only using tr, we are fairly sure this is impossible but maybe there is some ingenious idea?
r/bash • u/[deleted] • Jan 07 '26
help Is there anyone who can help me fix my script?
I wrote a bash script allows you to scrape detailed information about (social media platform) users by their username, without requiring logins or API keys. It extracts various user data such as follower counts, video counts, likes, and more.. The problem is that the script no longer retrieves the target’s region value. I don’t know why—at first the script was successfully scraping the region, but after some time it stopped returning any value for the region, while still retrieving all the other information correctly. Is there anyone who can help me with this?
r/bash • u/grawmpy • Jan 22 '26
help I wrote a professional interrupt script that does a lot more than simply pause and I am trying to consider a unique name for what it does. Explanation below.
Originally I just simply called it pause. Nothing fancy, I was simply looking to create something like the pause command provided in DOS but I wanted to add the features that I wanted to be able to utilize in a sysadmin environment that I always had to hard code in.
This project was a great learning experience in bash coding and I learned a mountain of information doing this. I started out more so to save myself writing dozens of lines of code to get a timer and I would have to spend a couple hundred lines of code and still not getting what this offers up in a single command.
Once I discovered the internal monotonic clock I was on a mission to make a timer that could keep accurate time as long as the script is running and will accept timing down to 0.005 if needed. This is a high precision timer capable of fractional timing and millisecond captures but can simply say, "Press [Enter] to continue..." and wait as long as it takes as a block timer or use the monotonic clock on a timer that checks for keypress every 0.01 seconds until the timer reaches zero. I have kept it so that there is little to no demand on the processor and the countdown only updates when needed. Script can be used as a "gatekeeper" for directing piped data. Data can be directed by command substitution into variables as needed.
All secondary information is sent to stderr while only the keypress and the gatekeeper piped information directed to stdout.
After some months of trial and error I finally am very close to a refined product. I will be releasing with GPL3.0+ license.
I added:
-a, --allowed CHARS (Only defined characters to be considered valid keypress. Case sensitive. Valid keys can be A-Za-z0-9, Enter, space)
-c, --case (change -a to case insensitive)
-C, --color OPTIONS (allow colorization with optional foreground and background color values as well as attributes to prompt, timer, and response or none. default colors are prompt=blue, timer=red, response=green)
-d,--default (the default key press to send to stdout for capturing if timer reaches zero without key press)
-e, --echo (echo the key press to stdout for capture)
-i, -in-pipe (use script as a gatekeeper script to capture and direct output to stdout.)
-j, --json PATH (writes all variable and system data in single line output without jq allowing for use on Mac as well as Linux. JSON output is Splunk, ELK, etc, ready allowing easy integration into current setups. See -l,--log for more)
-l, --log PATH (all internal system values and data can be shared to both .log and .json simultaneously. )
-p, --prompt TEXT (change from the default prompt "Press [Enter] to continue...")
-q, --quiet (run quiet, no output to stderr except response. Fastest response times down to 0.005. Theoretical floor of 0.002 is possible but not without some processor overload)
-r, --response TEXT (add response after continuation)
-t, --timer SECONDS ( I have used a monotonic timer for the clock so there is no lag or jump with the clock and keeps accuracy for extended periods. I have also added fractional capabilities for quick server queries that with no text output has a floor of .005 seconds and 0.01 for text output intervals respectively. Timer format is [YYyr:MMmn:DDdy:HH:MM:SS])
-u, --urgent SECONDS (adds a bold red color to turn at the given number of seconds)
-x, --extend (sends all variable and system data via stderr to either tyy/terminal [default], [-l] log file path or [-j] json file path)
That is the extent of the options that I have included so far, not including help text for general use [-h, --help] and color utilization [-Ch or --help-color] and version [-v] information.
I specifically designed this with the goal of only using bash internals for every task, updating to more modern internals depending on the bash version.
I have specifically designed in Mac 3.5 bash compatibility as well as going down to internals in 2.0+ to be able to still used on very old machines.
The script is around 1100 lines at the moment and will be ready for final disclosure once I can find a permanent name that says more than simply "pause".
Any suggestions?
I would also like to hear what could be introduced that would make this a utility that would be more of benefit for the server side as well as the general user. I think I have a pretty good product right here and am excited to have others see the final product soon. 🙏 Thanks
r/bash • u/Tomato_salat • Sep 20 '25
BASH must haves?
Hello, I am somewhat new to Linux and BASH. Are there any apps, packages which are really nice to have? For example I would really appriciate some kind of autocomplete feature for typing commands. Any suggestions how to achieve this?
Thank you very much :)
r/bash • u/[deleted] • Jan 06 '24
Bash used for ?
I am a Data Science students and ended up liking linux and stuff and started learning bash, I am enjoying this power of computers, but I do not understand where can I use it besides keeping it just for my resumes? what are the real life usages of bash ? does it integrates with Data Science ??
r/bash • u/[deleted] • Apr 12 '21
solved What to do with filenames with spaces inside of a for loop
I tried putting quotation marks around them, but it still treats them as multiple strings:
for f in $(find . -type f); do echo "$f"; doneAlternatively, is there any way to pipe find to another command and get rid of the stupid for? -exec won’t do because it doesn’t recognize my aliases for some reason.
As a side note, who was the complete fucking moron who decided that strings and code should be the same and that spaces should turn something into a list?! Have they never heard of typing? And does anybody know of a good shell where strings do not turn into code without an explicit exec() or something?
Upd: Solved:
for f in "$(find . -type f)"; do echo "$f"; donewhile read f ; do echo "$f"; done < <(find . -type f)
And this is what it could look like if Bash was sane:
find "." | filter isFile | map echo
r/bash • u/Safe_Mission_3524 • Jun 17 '26
tips and tricks Honest answers needed please
I am a noob at bash scripting but I ask LLMs to generate me commands or scripts after giving my detailed requirements. I then run them on a test server and if everything looks good, I run it on the production.
Seeing soo long commands, loops and conditions makes my head spin as I am a non coder. How are you guys able to remember every command or logic etc? Part of me thinks is because I use windows instead of a Linux distro and I am very comfortable using windows. I have tried dual booting my pc with multiple Linux distros but end up not using it after a day or two.
I know a few people who used to come up with long scripts for any specific task within minutes. How do you guys do that of the top of your head? Are there any tips or tricks for a noob like me? Thank you!
r/bash • u/ewhauser • May 01 '26
shuck - a fast linter for bash
shellcheck is great project but it's extremely slow and GPL licensed, so I've been working on a modern, clean-room Rust replacement over the past month or so. It should mostly be a drop in replacement for shellcheck with a just few rules showing some small divergences over ~34k open source shell scripts; more info on compatibility here: https://ewhauser.github.io/shuck/docs/shellcheck-compat/.
https://github.com/ewhauser/shuck
r/bash • u/jazei_2021 • Jul 09 '24
help how do I use mkdir -p for mkdir a and a/b and a/c and a/d? Why using -p?
Hi, Id like to learn how I should use mkdir -p for mkdir a a/b a/c a/d
I use actually mkdir -p a a/b a/c a/d
but what is the advantage of using the flag -p?
I can use the command mkdir a a/b a/c a/d without -p and get the same tree...
Thank you and regards!
r/bash • u/Keys__dev • Dec 14 '25
Automate the initial creation process of your bash script
Tired of the initial hassle of creating a Bash script—like making the file readable and executable? If so, this tool is for you.
https://github.com/Keys02/scriptify
PS: scriptify also adds the shebang line.
All contributions are welcome
Run a company of AI agents in pure Bash
I open-sourced 5dive, a CLI for running a company of AI agents on a Linux box you own. ~96% bash.

GitHub: https://github.com/5dive-ai/5dive (MIT)
Each agent gets its own Linux user and runs an official CLI like Claude Code, Codex, Grok, Pi, Hermes, opencode, etc. under systemd.
Linux handles identity, isolation, process supervision, logs. SQLite is the shared task queue.
So instead of a big agent framework, it is mostly:
Bash
systemd
Unix users
journald
SQLite
r/bash • u/[deleted] • Mar 10 '21

