pure-bash-bible icon indicating copy to clipboard operation
pure-bash-bible copied to clipboard

📖 A collection of pure bash alternatives to external processes.

Results 66 pure-bash-bible issues
Sort by recently updated
recently updated
newest added

hello: I am an Operations Engineer from China.A few days ago,I saw your open source project in github,pure-bash-bible. I often write some Linux scripts for working.Thank you for opening up...

Here are a few counter-examples: ```sh ~ $ dirname_pbb() { # Usage: dirname "path" printf '%s\n' "${1%/*}/" } ~ $ dirname dir1/dir2/ dir1 ~ $ dirname_pbb dir1/dir2/ dir1/dir2 ~ $...

discussion

Use exec to redirect all shell output thereafter.

Two small issues on [this](https://github.com/dylanaraps/pure-bash-bible#reverse-an-array) example: - By using `arrray[@]` instead of `array[*]` **printf** receives multiple arguments, that means that when trying to add another argument to the **printf** this...

enhancement

Add a method to turn off text effects

I've started work on an alternative version of the "pure bash bible" for pure POSIX `sh` snippets. https://github.com/dylanaraps/pure-sh-bible

enhancement

ord is usually handled by the external "od" command. ``` chr() { [ "$1" -lt 256 ] || return 1 printf "\\$(printf '%03o' "$1")" } ord() { LC_CTYPE=C printf '%d'...

enhancement

add a new array function

I am fond of this: ```bash HELP_TEXT="Usage: [-f|--foo-bar] [-o] baz" for i in "$@" do case $i in -f=*|--foo-bar=*) FOOBAR=" --other-scripts-flag=${i#*=}" shift # past argument=value ;; -o) OTHER=" -o" shift...

enhancement

Used Dylans extract funtion to generate "pure_bash.sh" file with code extracted to be easily sourced into bash. Some cosmetic change to easier read code, as well as rapport from test_reverse_array()...