etc
pure-bash-bible
etc | pure-bash-bible | |
---|---|---|
3 | 44 | |
1 | 35,862 | |
- | - | |
4.4 | 0.0 | |
10 months ago | 6 months ago | |
Go | Shell | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
etc
-
Starship.rs: minimal, fast prompt for any shell
Since this is now a share your prompt thread, here's mine:
https://github.com/rollcat/etc/tree/master/cmd/prompter
It's quite portable (didn't test on Windows though); ~170 lines of Go; no dependencies outside of stdlib; calls no external commands; supports SSH, git, Docker, nix, and virtualenv; extremely simple to hack on.
-
What is in that .git directory?
It's fairly easy to grab info from .git for your own purposes. For example, the program that generates my PS1 peeks there (without wasting precious cycles on shelling out to the git command) to find the current branch we're on:
https://github.com/rollcat/etc/blob/b2fd739/cmd/prompter/mai...
-
Pure Bash Bible
Depends on what you're trying to do. If you're shelling out to git(1) or docker(1), rather than e.g. recursively checking for the presence of .git in parent directories, or inspecting ~/.docker/config.json, then the fork+exec overhead is already quite significant. Next if you're parsing ~/.docker/config.json in shell, you're most likely either asking for trouble or (again) shelling out to jq. Writing it all in an interpreted language means you're paying the cost of interpreter startup, which on underpowered systems can take hundreds of milliseconds even when idle. OTOH loading a static binary to memory happens only once, and with Go you can trivially cross-compile.
I also have a fallback shell one-liner, without any of the fanciness like displaying the current git branch:
https://github.com/rollcat/etc/tree/master/cmd/prompter#i-li...
pure-bash-bible
- 🐧5 useful resources for anyone learning Linux
-
The bash book to rule them all
I believe it's been posted here before, but I also use this for reference whenever I forget the syntax to something, or know there must be a better way than what I am doing.
https://github.com/dylanaraps/pure-bash-bible
-
Ask HN: How does one practice day to day shell scripting
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 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.
- Pure Bash Bible
-
What is the meaning of ! -d
pure bash bible
-
Bourne Again SHell? more like Based AS Hell am i right gamers?
I recommend taking a look at https://github.com/dylanaraps/pure-bash-bible
-
What is a good way to learn bash scripting
Additionally, Pure Bash Bible is a bit more advanced but really fun to go through it.
-
hey i dicided to learn bash is the “bash mastery: the complete guide to bash scripting “ good ?
Here is another resource I have found useful.
-
Best Websites For Coders
Pure Bash Bible : A collection of pure bash alternatives to external processes.
- Unix shell script tactics - a style guide
What are some alternatives?
shunit2 - shUnit2 is a xUnit based unit test framework for Bourne based shell scripts.
pure-sh-bible - 📖 A collection of pure POSIX sh alternatives to external processes.
bish - Bish is a language that compiles to Bash. It's designed to give shell scripting a more comfortable and modern feel.
bash-oo-framework - Bash Infinity is a modern standard library / framework / boilerplate for Bash
meowatch - watch fs changes and meow
pterodactyl-installer - :bird: Unofficial installation scripts for Pterodactyl Panel
babashka - Native, fast starting Clojure interpreter for scripting
ShellCheck - ShellCheck, a static analysis tool for shell scripts
zfsbootmenu - ZFS Bootloader for root-on-ZFS systems with support for snapshots and native full disk encryption
void-trader - Custom oh-my-zsh plugin that displays the time left until the Void Trader in Warframe arrives.
update-golang - update-golang is a script to easily fetch and install new Golang releases with minimum system intrusion