-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystem_check.sh
More file actions
executable file
·72 lines (47 loc) · 905 Bytes
/
Copy pathsystem_check.sh
File metadata and controls
executable file
·72 lines (47 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
#Description: System inventory on demand
#Author:
#Date:
## checking if user is root
clear
if [ $UID -ne 0 ]
then
echo -e "\n You need to be root...\n"
exit 8
fi
## echo or cat does thesame thing
echo -e "\n Please make a choice below: \n
*********************************
* 1==> CPU *
* 2==> Memory *
* 3==> OS version *
* 4==> Processes *
* 5==> system bit *
* 6==> mount point *
* 7==> ip address *
* 8==> Hostname *
* 9==> kernel version *
* 10==> update OS *
*********************************"
echo -n " Enter your choice ( 1 - 10 )"
read ans
if [ ${ans} -eq 1 ]
then
lscpu
elif [ ${ans} -eq 2 ]
then
fdisk -h
fi
elif[ ${ans} -eq 3 ]
then
htop
elif [ ${ans} -eq 4 ]
then
lscpu
elif
if [ ${ans} -eq 5 ]
then
df -h
elif [ ${ans} -eq 6 ]
echo -e "\n Please enter a valid choice (1 - 10)"
exit 9