Advertisement
Guest User

Seni Edit .bash

a guest
Sep 25th, 2013
721
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #------------------------------------------////
  3. # Bash devis - dexvils
  4. # Last Modified 26 September 2013 by Me@dexvils
  5. # Running on Kali Linux
  6. # Colors:
  7. #------------------------------------------////
  8. black='\e[0;30m'
  9. blue='\e[0;34m'
  10. green='\e[0;32m'
  11. cyan='\e[0;36m'
  12. red='\e[0;31m'
  13. purple='\e[0;35m'
  14. brown='\e[0;33m'
  15. lightgray='\e[0;37m'
  16. darkgray='\e[1;30m'
  17. lightblue='\e[1;34m'
  18. lightgreen='\e[1;32m'
  19. lightcyan='\e[1;36m'
  20. lightred='\e[1;31m'
  21. lightpurple='\e[1;35m'
  22. yellow='\e[1;33m'
  23. white='\e[1;37m'
  24. nc='\e[0m'
  25. #------------------------------------------////
  26.  
  27.  
  28. deviskali ()
  29. {
  30. echo -n "c0de-number : "
  31. read dexvils
  32. if [ "$dexvils" == "1611" ] ; then
  33. echo "continue the desktop"
  34. else
  35. reboot
  36. fi
  37. }
  38.  
  39. localnet ()
  40. {
  41. /sbin/ifconfig | awk /'inet addr/ {print $2}'
  42. echo ""
  43. /sbin/ifconfig | awk /'Bcast/ {print $3}'
  44. echo ""
  45. }
  46. myip ()
  47. {
  48. lynx -dump -hiddenlinks=ignore -nolist http://checkip.dyndns.org:8245/ | grep "Current IP Address" | cut -d":" -f2 | cut -d" " -f2
  49. }
  50. upinfo ()
  51. {
  52. echo -ne "${blue}$HOSTNAME ${red}uptime is ${green} \t ";uptime | awk /'up/ {print $3,$4,$5,$6,$7,$8,$9,$10}'
  53. }
  54. cd()
  55. {
  56.   if [ -n "$1" ]; then
  57.     builtin cd "$@" && ls
  58.   else
  59.     builtin cd ~ && ls
  60.   fi
  61. }
  62. weather ()
  63. {
  64. declare -a WEATHERARRAY
  65. WEATHERARRAY=( `lynx -dump "http://www.google.com/search?hl=en&lr=&client=firefox-a&rls=org.mozilla_en-US_official&q=weather+${1}&btnG=Search" | grep -A 5 -m 1 "Weather for" | sed 's;\[26\]Add to iGoogle\[27\]IMG;;g'`)
  66. echo ${WEATHERARRAY[@]}
  67. }
  68. #------------------------------------------////
  69. # Some original .bashrc contents:
  70. #------------------------------------------////
  71. # If not running interactively, don't do anything
  72. [ -z "$PS1" ] && return
  73. # don't put duplicate lines in the history. See bash(1) for more options
  74. export HISTCONTROL=ignoredups
  75. # update the values of LINES and COLUMNS.
  76. shopt -s checkwinsize
  77. # make less more friendly for non-text input files, see lesspipe(1)
  78. [ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
  79. # set variable identify\e[1;32ming the chroot you work in (used in the prompt below)
  80. if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
  81.     debian_chroot=$(cat /etc/debian_chroot)
  82. fi
  83. #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]devis@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  84. #------------------------------------------////
  85. # Prompt:
  86. #------------------------------------------////
  87.  
  88. #PS1='\e[0;36m\h\[\e[0;36m\] \w \[\033[00m\] $ \[\033[00m\]'
  89. PS1='\033[01;31mdevis\[\033[01;35m\]@\[\033[01;34m\]\h\[\033[00;32m\]{\[\033[01;32m\]\w\[\033[01;32m\]}\[\033[01;32m\]:\[\033[00m\]'
  90. #PS1='\e[0;36m\W\@ \$\e[m '
  91. #if [ `id -un` != root ]; then
  92. #PS1="[${EGR}\u@\h${EBL} \W${NONE}]# "
  93. #else
  94. #PS1="[${ERD}\h${EBL} \W${NONE}]# "
  95. #fi
  96. #------------------------------------------////
  97. # System Information:
  98. #------------------------------------------////
  99. clear
  100. deviskali;
  101.  
  102.  
  103. # Spicing up Terminal
  104. /usr/games/fortune | /usr/games/cowsay -f ghostbusters
  105. echo
  106.  
  107. echo -e "${lightgreen}";figlet -f  digital "devis@dexvils"
  108. echo -ne "${yellow}Today is:\t\t${red}" `date`; echo ""
  109. echo -e "${darkgray}Kernel Information: \t${red}" `uname -smr`
  110. echo -ne "${lightcyan}";upinfo;echo ""
  111. echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement