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

Liste des GroupesRevenir à cu shell 
Sujet : Re: how to capture only 7 or 8 in /etc/redhat-release
De : Cyrille.Lefevre-news%nospam (at) *nospam* laposte.net.invalid (Cyrille Lefevre)
Groupes : comp.unix.shell
Date : 29. Mar 2024, 03:10:11
Autres entêtes
Organisation : ACME
Message-ID : <66062301$0$2568$426a34cc@news.free.fr>
References : 1
User-Agent : Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
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.

Date Sujet#  Auteur
29 Mar 24 o Re: how to capture only 7 or 8 in /etc/redhat-release1Cyrille Lefevre

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal