File: prosname.sh

package info (click to toggle)
afbackup 3.1beta1-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,500 kB
  • ctags: 1,685
  • sloc: ansic: 22,406; csh: 3,597; tcl: 964; sh: 403; makefile: 200
file content (21 lines) | stat: -rwxr-xr-x 384 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/sh

OS="`uname -s|sed 's/[^A-Za-z0-9]//g'`"

if [ $OS = "AIX" ] ; then
  VERSION=`uname -v|sed 's/[.][0-9].*//g'`
else
  if [ $OS = "HPUX" -o $OS = "OSF1" ] ; then
    VERSION=`uname -r|sed 's/^[^0-9]*//g;s/[.][0-9].*//g'`
  else
    VERSION=`uname -r|sed 's/[.][0-9].*//g'`
  fi
fi
VERSION=`echo $VERSION|sed 's/^0*//g'`

OSNAME=$OS"_"$VERSION
 
export OSNAME

echo $OSNAME