Correct way to determine distro version in bash?
edfelt at gmail.com
Mon Apr 8 16:59:10 MDT 2013
"cat /etc/redhat-release" always works for RHEL, CENTOS and Fedora (at
least for the last 5 to 10 years). You can also do "uname -a" and then
parse. There may be a better switch that does just os info on uname
(check the man page).
On Apr 8, 2013 4:46 PM, "Joseph Hall" <perlhoser at gmail.com> wrote:
> On Mon, Apr 8, 2013 at 4:30 PM, S. Dale Morrey <sdalemorrey at gmail.com>
> > This got me thinking, is there a correct way to check this sort of thing?
> > Something that's going to be consistent, at least across direct
> > such as RHEL & CentOS?
> If there's one thing that I've discovered, there is nothing that is
> absolutely reliable across every distro. However, looking at
> /etc/*release will get you close.
> "In order to create, you have to have the willingness, the desire to
> be challenged, to be learning." -- Ferran Adria (speaking at Harvard,
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
More information about the PLUG