Skip to content

Instantly share code, notes, and snippets.

View ProBackup-nl's full-sized avatar
🏠
Working from home

C. Jacobs ProBackup-nl

🏠
Working from home
View GitHub Profile
@jhurliman
jhurliman / getopts.sh
Created August 25, 2015 22:44
Parse command line options in pure bash
# Parse command line arguments
while [[ $# > 1 ]]; do
local key="$1"
case $key in
-g|--github-token)
GITHUB_TOKEN="$2"
shift
;;
# Catch-all
*)
@mgoellnitz
mgoellnitz / gist.sh
Last active March 31, 2025 13:35
Gist Command Line Tool for Single File Gists
#!/bin/sh
#
# Copyright 2016-2025 Martin Goellnitz
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,