Advertisement
pouar

pinkiepiesays

Sep 9th, 2015
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.47 KB | None | 0 0
  1. #!/bin/bash
  2. function finish()
  3. {
  4.     exit $?
  5. }
  6.  
  7. while getopts ":t:u:" FLAG; do
  8.   case $FLAG in
  9.     t)  #set option "a"
  10.       TIME=$OPTARG
  11.       ;;
  12.   esac
  13.   LOOP=1
  14. done
  15. shift $((OPTIND-1))
  16.  
  17. function finish()
  18. {
  19.     exit $?
  20. }
  21. while :;do
  22.     notify-send --icon=/usr/share/pixmaps/pinkie.png --urgency=low "Pinkie Pie Says" "$(fortune -e $@|recode ascii..html)"
  23.     if [ -z $LOOP ];then
  24.         break
  25.     fi
  26.     sleep $TIME
  27. done
  28.  
  29. trap finish SIGINT SIGHUP SIGTERM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement