CrunchBang Linux Pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

CrunchBang Linux Pastebin

Posted by VDP76 on Thu 12th Jul 21:12 (modification of post by view diff)
download | new post

  1. ##cb-clean##
  2. #!/bin/bash
  3.  
  4. SDIR="/home/$USER/bin/cb-lib-dir"
  5. terminator --title="#! Cleaning Script" --command="$sdir/cb-lib-clean"
  6.  
  7.  
  8. ##cb-lib-clean##
  9.  
  10. #!/bin/bash
  11. clear
  12. echo "
  13.   REMOVE RESIDUAL CONFIGURATIONS AND FREE-UP SPACE
  14.   -------------------------
  15.   Would you like to clean your system?
  16.   If you choose to do this, this script will execute the commands:
  17.  
  18.     sudo apt-get update && sudo apt-get clean
  19.     sudo apt-get autoremove
  20.     sudo apt-get purge $(dpkg -l | grep '^rc' | awk '{print $2}')
  21.  
  22.   Hit any key to clean your system, or \"x\" to exit..."
  23.  
  24.  
  25. read -n1 a
  26. a=`echo $a | tr '[A-Z]' '[a-z]'`
  27. if [ "$a" != "x" ]; then
  28.     echo ""
  29.     sudo apt-get update && sudo apt-get clean
  30.     sudo apt-get autoremove
  31.     sudo apt-get purge $(dpkg -l | grep '^rc' | awk '{print $2}')
  32.     else
  33.     exit 0
  34. fi
  35. echo ""
  36. read -p "Script terminated, hit [ENTER] key to exit."
  37. exit 0

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me