Created
May 7, 2024 19:28
-
-
Save jhurliman/ae71b06390acb8496711c77037303197 to your computer and use it in GitHub Desktop.
Extract the NVIDIA Jetson L4T <RELEASE>.<MAJOR> version from /etc/nv_tegra_release
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_L4T_major_version_only { | |
# Will return the L4T <release>.<major> version (ex: "32.6" or "32.4") | |
local RELEASE=$(cat /etc/nv_tegra_release | grep -oP "R\d{2}" | grep -oP "\d{2}") | |
local MAJOR_VERSION=$(cat /etc/nv_tegra_release | grep -oP "REVISION: \d{1}\.\d{1}" | grep -oP "\d{1}.\d{1}" | grep -oP "\d{1}". | grep -oP "\d{1}") | |
echo "${RELEASE}.${MAJOR_VERSION}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment