Skip to content

Instantly share code, notes, and snippets.

@slowpeek
slowpeek / stack.sh
Last active August 20, 2021 15:09
stack.sh
# -*- mode: sh; sh-shell: bash; -*-
# shellcheck shell=bash
# MIT license (c) 2021 https://github.com/slowpeek
# Homepage: https://gist.github.com/slowpeek/3310c2f09b80d0b2e175122e8c8cae64
# bye.sh https://gist.github.com/slowpeek/6127166369d8abd230c30c20cc6a9152
# Simple stack for strings. It operates on var names:
#
@slowpeek
slowpeek / bye.sh
Last active June 4, 2022 00:52
bye.sh
# -*- mode: sh; sh-shell: bash; -*-
# shellcheck shell=bash
# MIT license (c) 2021 https://github.com/slowpeek
# Homepage: https://gist.github.com/slowpeek/6127166369d8abd230c30c20cc6a9152
##############################################################
##############################################################
## THIS GIST IS OBSOLETE AND IS NO LONGER UPDATED.
## Use here-bye instead: https://github.com/slowpeek/here-bye
@slowpeek
slowpeek / shopt_ensure.sh
Last active August 20, 2021 15:06
shopt_ensure
# -*- mode: sh; sh-shell: bash; -*-
# shellcheck shell=bash
# MIT license (c) 2021 https://github.com/slowpeek
# Homepage: https://gist.github.com/slowpeek/3e592af3395cfb0e2d20a57c50a87a4b
# bye.sh https://gist.github.com/slowpeek/6127166369d8abd230c30c20cc6a9152
# stack.sh https://gist.github.com/slowpeek/3310c2f09b80d0b2e175122e8c8cae64
# This is a wrapper around bash builtin shopt. It can be used to save