• how to capture only 7 or 8 in /etc/redhat-release

    From Cyrille Lefevre@21:1/5 to All on Fri Mar 29 03:10:11 2024
    Le Mon, 5 Jun 2023 05:23:27 -0700 (PDT), Neeraj Kumar <neeraj.friendslover@gmail.com> a Θcrit :

    I have two version; please help me to get the version in the form of 7 or 8

    osver=$(tr -cd 0-9 < /etc/redhat-release)
    minor=%${osver#?}
    major=${osver%${osver#?}}

    Regards
    --
    mailto:Cyrille.Lefevre-news%nospam@laposte.net.invalid
    remove "%nospam" and ".invalid" to answer me.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)