Skip to content

Instantly share code, notes, and snippets.

View hsk81's full-sized avatar

Kârūn The Rich hsk81

View GitHub Profile
#!/usr/bin/env bash
###############################################################################
source /etc/profile.d/go.sh
###############################################################################
function command_fqn {
local cmd ;
cmd=$([[ "$1" =~ ([^/]+)/([^/]+)\.sh$ ]] && printf '%s' "${BASH_REMATCH[1]}") ;
local sub ;
sub=$([[ "$1" =~ ([^/]+)\.sh$ ]] && printf '%s' "${BASH_REMATCH[1]}") ;