-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathssc.sh
More file actions
74 lines (74 loc) · 1.86 KB
/
ssc.sh
File metadata and controls
74 lines (74 loc) · 1.86 KB
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
72
73
74
clear
BICyan='\033[1;96m' # Cyan
Color_Off='\033[0m' # Text Reset
IRed='\033[0;91m' # Redclear
IGreen='\033[0;92m' # Green
BYellow='\033[1;33m' # Yellow
p=$1
if (($p == 1))
then
while true
do
clear
printf "\t\t${BICyan}SYSTEM STATUS COMMANDS${Color_Off}\n\n"
printf "1 -- Display the current date and time\n"
printf "2 -- Current disk usage\n"
printf "3 -- List current local and environmental\n"
printf "4 -- Display process status information\n"
printf "${IRed}5 -- Exit Program${Color_Off}\n\n"
printf " Enter your choice:\n\n>>>\t\t "
read a
printf "\n\n"
case "$a" in
1) date "+DATE: %D%nTIME: %T"
;;
2) df -H;;
3) compgen -v;;
4) ps ;;
5) bash el.sh
exit
;;
*) printf "${IRed} Invalid choice - Try Again\n\n${Color_Off}"
;;
esac
printf "\n\n${BYellow}\t"
read -p "Press enter to continue"
printf "\n\n${Color_Off}"
done
fi
if (($p == 0))
then
while true
do
clear
printf "\t\t${BICyan}SYSTEM STATUS COMMANDS\n\n${Color_Off}"
printf "1 -- Display the current date and time\n"
printf "2 -- Current disk usage\n"
printf "3 -- List current local and environmental\n"
printf "4 -- Display process status information\n"
printf "${IRed}5 -- Quit -- Return to Main Menu\n\n${Color_Off}"
printf " Enter your choice:\n\n>>>\t\t "
read a
printf "\n\n"
case "$a" in
1) date "+DATE: %D%nTIME: %T"
;;
2) df -H;;
3) compgen -v;;
4) ps ;;
5) flag=0
break
;;
*) printf "${IRed}\n Invalid choice - Try Again\n\n${Color_Off}"
;;
esac
printf "\n\n${BYellow}\t"
read -p "Press enter to continue"
printf "\n\n${Color_Off}"
done
fi
if (( $flag == 0 ))
then
bash l.sh Loading
bash myHelp.sh
fi