From 8ad0e387805254c569833c152cbbe72bfebea9a2 Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Wed, 17 May 2023 10:30:45 +0100 Subject: [PATCH] Add an alias to return a site's Akamai Property name and version --- .bashrc.d/akamai | 1 + 1 file changed, 1 insertion(+) diff --git a/.bashrc.d/akamai b/.bashrc.d/akamai index 9054c7a..da8d77c 100644 --- a/.bashrc.d/akamai +++ b/.bashrc.d/akamai @@ -1 +1,2 @@ alias akamai="docker run --rm -it -u \$(id -u) -v /dev/null:/etc/motd -v \${HOME}/.edgerc:/.edgerc -v \$(pwd):/workdir akamai/shell akamai" +function aka-prop() { OUTPUT=$(elcurl https://${1} --headers --debug-akamai-max | tr -d '\r' | grep PROP); PROP=$(echo "${OUTPUT}" | head -1 | cut -f3 -d=); VER=$(echo "${OUTPUT}" | tail -1 | cut -f3 -d=); echo "${PROP} v${VER}"; } && export -f aka-prop