Skip to content

Instantly share code, notes, and snippets.

@nexus166
Created July 2, 2019 12:58
Show Gist options
  • Select an option

  • Save nexus166/af6d3dfffdfef897dd2d0f92791e9b0f to your computer and use it in GitHub Desktop.

Select an option

Save nexus166/af6d3dfffdfef897dd2d0f92791e9b0f to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -x
eval $(< /etc/os-release)
set +x
_os="$(printf '%s' ${ID} | tr '[[:upper:]]' '[[:lower:]]')"
_version="$(printf '%s' "${VERSION}" | awk -F'[()]' '{print tolower($2)}' | cut -d' ' -f1)"
printf '%s:%s' "${_os}" "${_version}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment