linux - How to detect if my server is running centos or other from a perl script -


i want display text in script if operating system centos . how can in perl script ?

to answer exact question, can identify centos reading contents of /etc/redhat-release. e.g.

$ cat /etc/redhat-release centos release 5.9 (final) 

as other commenters have made clear, better depend on exact os features want, or write code portable, rather limiting particular distribution of linux.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -