HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
dylanaraps
pure-bash-bible
Shell2018–2025
dylanaraps / pure-bash-bible · Archived

pure-bash-bible

📖 A collection of pure bash alternatives to external processes.

28Distinct people
29Mentions
0Explicit recommenders
41.7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

📖 A collection of pure bash alternatives to external processes.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year29 dated mentions

Observed mentions: 2018-06-15 12:03:30 UTC to 2025-07-09 19:07:57 UTC.

02462018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 7 mentions; 6 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 2 submissions, 0 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC761
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC514
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC404
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC211
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC615
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC312
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC220

What Hacker News says

29 sources
I'd say check out the work of William Shotts at https://linuxcommand.org/ His book, "The Linux Command Line" is free for downloading, and there are lots of references to style guides, good practices, and bash templates in the book. There is also a shorter, HTML version at the same site: https://linuxcommand.org/lc3_learning_the_shell.php I'm trying to get a little proficiency in all this, and just yesterday I went through the "Further Reading" sections at the end of each chapter, and captured all the likely URLs for further investigation. One that looks really good is Dylan Araps' "Pure Bash Bible" ( See https://github.com/dylanaraps/pure-bash-bible ) Confession: I found a PDF copy at Libgen, but don't tell anyone. This and the Shotts book have also been thoroughly discussed on Hacker News in the past. (I.e., search on the two titles and
Read the rest
you'll probably get all the opinions that you can stand, plus maybe some more hints.) Bash is profoundly weird, but if/when you can make it work, it's slick.
In Ask HN: How does one practice day to day shell scripting
For a pretty good example of a readable/fun program written in bash, the KISS package manager stands out: https://github.com/kisslinux/kiss/blob/master/kiss Neofetch is also written in bash: https://github.com/dylanaraps/neofetch/blob/master/neofetch For my own work, I once wrote a functional file system based irc client in ~50 lines of bash: https://github.com/retrohacker/irc-sh/blob/master/main.sh To learn bash: * https://tldp.org/LDP/abs/html/ * https://github.com/dylanaraps/pure-bash-bible
In My thoughts on writing a Minecraft server from scratch in Bash
This pairs extremely well with dylan's Pure Bash/sh Bible [1], both, combined with admittedly way too many hours browsing random people's dotfiles can exponentially increase your skills with shells scripting. Some tips of my own: Adding `2>/dev/null` or `>/dev/null 2>&1`after most commands with expected or just plain useless output can make writing headless scripts very easy, it also comes in very handy when trying to shut up some basic utilities. A handy function: execute() { pkill -x "$1" { sleep 0.1 "$@" & } } >/dev/null 2>&1 `set --` before running a command can be used to remove all excess whitespace (making parsing dead easy). And last but not least always using printf instead of echo makes your scripts 1000x cooler :) 0. https://github.com/dylanaraps/pure-sh-bible 1. https://github.com/dylanaraps/pure-bash-bible
In Shell [Scripting] Style Guide
Actually one more thing I realized about this idea that would be wild... Since re2c itself is written in C, it can be easily compiled to wasm (even if it has a few gotos). So then you get an engine that can compile user patterns at runtime, rather than having it be an offline process. (I don't really think there is that much difference in constraints between the offline and online processes, as some of have suggested. For example I observed that re2c compile time is linear with respect # constants strings in a large range in that benchmark.) I have been thinking of embedding wasm in Oil, mainly to do reasonably fast string transformations. Because one goal of Oil is to provide an alternative to extremely tortured string transformation syntax like: https://github.com/dylanaraps/pure-bash-bible And Oil has the eggex language, that compil
Read the rest
es to egrep syntax, and uses libc's engine. But it would be cool if it could compile to DFAs with an embedded re2c compiler. Then again, I was surprised that the compiled C code was not faster than an intepreter for small cases, so maybe this whole thing is too complex for the benefit... I guess I would have to do some up front benchmarks to see if this is even worth it. It could be that you need an extremely fast wasm engine to make it worthwhile, and all of those are tied to big JS engines and their very non-portable JITs. [1] https://johnwickerson.wordpress.com/2020/05/21/diagrams-for-... ---- edit: found some related comments: https://news.ycombinator.com/item?id=18553393 Surprise, the "totally shocking" result there is due to BACKTRACKING :) Automata-based regex in wasm beats native browser regex because it doesn't backtrack.
In ReDoS: Regular Expression Denial of Service

Showing the 15 most recent of 29 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.