fix uuid behavior for linux
MODIFY
aliases/available/kubectl.aliases.bash
aliases/available/kubectl.aliases.bash
@@ -18,7 +18,7 @@ function _set_pkg_aliases()
alias kcdn='kubectl describe node'
alias kcgpan='kubectl get pods --all-namespaces'
alias kcgdan='kubectl get deployments --all-namespaces'
- alias kcnetshoot='kubectl run --generator=run-pod/v1 netshoot-$(uuidgen | tr A-Z a-z | sed 's/-//g') --rm -i --tty --image nicolaka/netshoot -- /bin/bash'
+ alias kcnetshoot='kubectl run --generator=run-pod/v1 netshoot-$(date +%s) --rm -i --tty --image nicolaka/netshoot -- /bin/bash'
fi
}

MODIFY
aliases/available/uuidgen.aliases.bash
aliases/available/uuidgen.aliases.bash
-cite 'uuid-alias'
-about-alias 'uuidgen aliases'
+# cite 'uuid-alias'
+# about-alias 'uuidgen aliases'
+if [ "$(uuid 2>/dev/null)" != "" ]; then # Linux
+ alias uuidu="uuid | tr '[:lower:]' '[:upper:]'"
+ alias uuidl=uuid
+elif [ "$(uuidgen 2>/dev/null)" != "" ]; then # macOS/BSD
alias uuidu="uuidgen"
-alias uuidl="uuidgen | tr '[:upper:]' '[:lower:]'"
-alias uuid=uuidl # because upper case is like YELLING
+ alias uuid="uuidgen | tr '[:upper:]' '[:lower:]'" # because upper case is like YELLING
+ alias uuidl=uuid
+fi

fix uuid behavior for linux