Archive for June 10th, 2011
How to find which linux distribution you are running from a shell script
Friday, June 10th, 2011sed -n -e ‘s/ *(.*)//g’ -e ‘s/ /-/g’ -e ‘1p’ /etc/issue
Examples:
nethead2:$ sed -n -e 's/ *(.*)//g' -e 's/ /-/g' -e '1p' /etc/issue
Scientific-Linux-release-6.0
dhollowa-106$ sed -n -e 's/ *(.*)//g' -e 's/ /-/g' -e '1p' /etc/issue
CentOS-release-5.6