Pure Bash Bible
11–20 of 258 posts
Re: Pure Bash Bible
#12I expected a tool on bash where you can access the pure "Bible" hallelujah.sh
Re: Pure Bash Bible
#13Re: Pure Bash Bible
#14Re: Pure Bash Bible
#15Here's an example of what bash is capable of: https://github.com/dylanaraps/fff/ (a TUI file manager written in bash)!
Re: Pure Bash Bible
#16While this is interesting I see doing anything but launching programs with simple text-substituted arguments as too much for bash or sh. Run shellcheck on some of your own code, or the code of even a simple project to see how hard it is to really use bash. Why I think people gravitate towards it is because languages such as python add too much pomp to launching a shell process. A language like perl is usually easier…
It also tends to be very portable.
Re: Pure Bash Bible
#17While this is interesting I see doing anything but launching programs with simple text-substituted arguments as too much for bash or sh. Run shellcheck on some of your own code, or the code of even a simple project to see how hard it is to really use bash. Why I think people gravitate towards it is because languages such as python add too much pomp to launching a shell process. A language like perl is usually easier…
For these, being able to avoid the various $(echo... |sed) can be refreshing. Beside, the book makes for a nice repository of techniques.
Re: Pure Bash Bible
#18Didn't realize at first that "pure" refers to features available in bash without calling out to external processes, when I would've thought purism in this context should refer to avoiding bashisms and writing portable (ksh, POSIX shell) scripts.
My focus for the past few months has been writing a Linux distribution (and its package manager/tooling) in POSIX sh.
I've learned a lot of tricks and I'm very tempted to write a second "bible" with snippets that are supported in all POSIX shells.
(I created the bash bible).
Re: Pure Bash Bible
#19I expected a tool on bash where you can access the pure "Bible" hallelujah.sh
On that note, does anyone have a favorite cli Bible reading program?
Re: Pure Bash Bible
#20no mention of /dev/tcp?! yes, it looks like a device node in /dev, but it's really a pure bashism for opening tcp connections to arbitrary hosts and ports
I've since implemented a very bare-bones and very featureless IRC client using /dev/tcp and bash.
https://github.com/dylanaraps/birch
I will get around to it eventually. The one hurdle I want to get over before writing a piece about it is the handling of binary data using bash.
This is something a little tricky to do with bash but it'd allow for a 'wget'/'curl' like program without the use of anything external to the shell (no HTTPS of course).
I want to really understand the feature before I write about it though in the meantime I could just write a reference to the syntax/basic usage. :)