forked from kcdon/Unix-Shell-Interface
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexpert3.sh
More file actions
53 lines (41 loc) · 751 Bytes
/
expert3.sh
File metadata and controls
53 lines (41 loc) · 751 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
clear
echo " SYSTEM STATUS COMMANDS"
echo -e "\n"
echo -e "\n"
echo " 1 -- Display Date and time"
echo " 2 -- Current Disk usage"
echo " 3 -- List Current local and environmental"
echo " 4 -- Display Process status information"
echo " 5 -- Exit Program"
echo -e "\n"
breaker=1
while [ "$breaker" -eq 1 ]
do
echo -n " Enter your choice: "
read input
if [[ $input -eq 5 ]] ; then
clear
breaker=2
exit 0
fi
if [[ $input -eq 1 ]] ; then
echo -n "DATE : "
date "+%d / %m / %Y"
echo -n "TIME : "
date "+%I : %M : %S"
fi
if [[ $input -eq 4 ]] ; then
ps
fi
if [[ $input -eq 2 ]] ; then
df -h
fi
if [[ $input -eq 3 ]] ; then
printenv > t.txt
more t.txt
fi
if[[ $input -eq 0 ]] ; then
printenv > t.txt
more t.txt
fi
done