Andy Dougherty <doughera@lafayette.edu> writes: > I'm currently trying to patch Configure to tell you the Linux > distribution (RedHat, SuSE, Debian, others as folks supply the > information), and I'm unsure of how to best parse RedHat's > /etc/redhat-release file. I have the following 1 example: > > Red Hat Linux release 6.1 (Cartman) > > I'm guessing that the '6.1' is what would be most useful. Does anyone have > a variety of Red Hat systems around or enough familiarity with Red Hat to > say how stable that format is or give me other examples? Here are some from the servers where I work: release 4.1 (Vanderbilt) release 5.0 (Hurricane) release 5.1 (Manhattan) Red Hat Linux release 5.2 (Apollo) Red Hat Linux release 6.0 (Hedwig) Red Hat Linux release 6.1 (Cartman) I presume that /release (\d+\.\d+)/i would give you the version for all of the above and any future reasonable changes. Chip -- Chip Turner chip@ZFx.com Programmer, ZFx, Inc. www.zfx.com PGP key available at wwwkeys.us.pgp.net