Advertisement
v1ral_ITS

Terminal Shell Script Making apt Easy And Killing Processes

Jul 13th, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.33 KB | None | 0 0
  1. #!/bin/bash
  2. #######################
  3. # Bash Menu Scripting #
  4. ################################
  5. # GLOBAL VARIABLES IN ALL CAPS #
  6. #########################################################################################
  7. #########################################################################################
  8. ##                                                                                     ##
  9. #  v1ral_ITS   |   ImPerialTeKSolutions@outlook.com   |   www.pastebin.com/u/v1ral_ITS  #
  10. ##                                                                                     ##
  11. #########################################################################################
  12. #########################################################################################
  13. # Console colors
  14. W='\033[0m'  # white (normal)
  15. R='\033[31m'  # red
  16. G='\033[32m'  # green
  17. O='\033[33m'  # orange
  18. B='\033[34m'  # blue
  19. P='\033[35m'  # purple
  20. C='\033[36m'  # cyan
  21. GR='\033[37m'  # gray
  22.  
  23. #####################
  24. #     START         #
  25. #####################
  26.  
  27. PS3='Please enter your choice: '
  28. options=("`echo -e $O Update`" "`echo -e $B Upgrade`" "`echo -e $C Install`" "`echo -e $GR Autoremove`" "`echo -e $P Purge`" "`echo -e $W Kill_Processes`" "`echo -e $C Clear Screen`" "`echo -e $GR Enter Your Own Command`" "`echo -e $P $BLINK Quit`")
  29. select opt in "${options[@]}"
  30. do
  31.     case $opt in
  32.         "`echo -e $O Update`")
  33.             sudo apt-get -y update
  34.             echo -e $C"Your options again are, press [E]nter \n `echo $options`"
  35.             ;;
  36.         "`echo -e $B Upgrade`")
  37.             sudo apt-get -y upgrade
  38.             echo -e $C"Your options again are, press [E]nter \n `echo $options`"
  39.             ;;
  40.         "`echo -e $C Install`")
  41.             echo -n "What do you want to install?: "
  42.             read INST
  43.             sudo apt-get -y install $INST
  44.             echo -e $C"Your options again are, press [E]nter \n `echo $options`"
  45.             ;;
  46.         "`echo -e $GR Autoremove`")
  47.             sudo apt-get -y autoremove
  48.             echo -e $C"Your options again are, press [E]nter \n `echo $options`"
  49.             ;;
  50.         "`echo -e $P Purge`")
  51.             echo -n "What do you want to purge?: "
  52.             read PGE
  53.             sudo apt-get -y purge $PGE
  54.             echo -e $C"Your options again are, press [E]nter \n `echo $options`"
  55.             ;;
  56.         "`echo -e $W Kill_Processes`")
  57.             echo -e $R"`killps`"
  58.             echo -e $C"Your options again are, press [E]nter \n `echo $options`"
  59.             ;;
  60.         "`echo -e $C Clear Screen`")
  61.             echo -e $O"`clear`"
  62.             echo -e $C"Your options again are, press [E]nter \n `echo $options`"
  63.             ;;
  64.     "`echo -e $GR Enter Your Own Command`")
  65.         MSG=$(zenity --title "Terminal Command Entry" --entry )
  66.         sudo $MSG
  67.         echo -e $C"Your options again are, press [E]nter \n `echo $options`"
  68.         ;;
  69.         "`echo -e $P $BLINK Quit`")
  70.             break
  71.             ;;
  72.         *) echo invalid option;;
  73.     esac
  74. done
  75. echo -en "Please Email us @ ImPerialTeKSolutions@outlook.com for any and all questions comments, freelance work, and any other projects. We like feedback, thanks!"
  76. sleep 4
  77.  
  78.  
  79. # Console colors ##############
  80. W='\033[0m'  # white (normal) #
  81. R='\033[31m'  # red           #
  82. G='\033[32m'  # green         #
  83. O='\033[33m'  # orange        #
  84. B='\033[34m'  # blue          #
  85. BLINK='\e[5m' # blink         #
  86. P='\033[35m'  # purple        #
  87. C='\033[36m'  # cyan          #
  88. GR='\033[37m'  # gray         #
  89. ###############################
  90. #     REMINDER            #
  91. ###############################
  92.  
  93. cd "`pwd`";
  94.     echo -e \n\n\n`clear`;
  95.     echo -e $GR" `date` ";
  96.     echo -e $O" Shell Scripts Made For You........";
  97.     echo -e $P" Your present working directory is `pwd`...";
  98.     echo -e Inside....
  99.     ls;
  100.     echo -e $W"  
  101.    $R########################################################$G##################################################################
  102.     $G#####         *                                                                   $R  *                   ####
  103.    $GR#####         SHELL SCRIPTS MADE EASY FOR THE LINUX USER      $C    2018_vet   ImP.TeK_Solutions TM                     ####
  104.     $G#####         *                                                                           $R  *                   ####
  105.    $R########################################################$G##################################################################
  106.    "
  107. date
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement