-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexpert3.sh
More file actions
46 lines (37 loc) · 698 Bytes
/
expert3.sh
File metadata and controls
46 lines (37 loc) · 698 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
clear
echo " SYSTEM STATUS COMMANDS"
echo -e "\n"
echo -e "\n"
echo " 1 -- Display current 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
done