Wednesday, November 23, 2011

shell script to get linux version

############################################################
#  Author      : Saurabh Gupta                             #
#  Created     : 9:30 AM 23/11/2011                        #
#  shell script to get Linux Version Running               #
#  get linux version  shell script                         #
############################################################

#!/bin/bash
echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
echo "XXXXXXX          Retrieving Linux Version Information       XXXXXXX"
echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

CHECK_OS_VERSION=`uname -r | sed -e 's/\./ /g' | awk '{print $4}'`

echo "Your Linux OS Version is = $CHECK_OS_VERSION"
echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
############################################################
#
# OUTPUT
#
############################################################
[sgupta@ivog-ks-200 scripts]$ . ./getOSVersion.sh
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXX          Retrieving Linux Version Information       XXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Your Linux OS Version is = el5
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[sgupta@ivog-ks-200 scripts]$
 
 #

See Also:

No comments:

Post a Comment