File: osver

package info (click to toggle)
mysql%2B%2B 3.0.0-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 10,328 kB
  • ctags: 9,487
  • sloc: cpp: 33,486; sh: 3,091; perl: 809; makefile: 683
file content (16 lines) | stat: -rwxr-xr-x 340 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
if grep Red /etc/issue > /dev/null 2>&1
then
	echo -n rh
	grep Red /etc/issue |cut -f5 -d' '
elif grep Fedora /etc/issue > /dev/null 2>&1
then
	echo -n fc
	grep Fedora /etc/issue |cut -f4 -d' '
elif grep CentOS /etc/issue > /dev/null 2>&1
then
	echo -n el
	grep CentOS /etc/issue |cut -f3 -d' ' |cut -f1 -d.
else
	echo UNKNOWN
fi