Advertisement
TheHotBot

Eat with me maniak!

Jul 3rd, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.61 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #############################
  4. ## Use at your own risk!!  ##
  5. ## Maniak dont always eat  ##
  6. #############################
  7.  
  8.  
  9. SERVICE_HOME="home/maniak/"
  10. LOG_FILE=$SERVICE_HOME/lunch.out
  11.  
  12. ERROR_STRING=dont_wanna_eat_with_you
  13.  
  14. tail -Fn0 $LOG_FILE | \
  15. while read line ; do
  16.         echo "$line" | grep "$ERROR_STRING"
  17.         if [ $? = 0 ]
  18.         then
  19.              
  20.         touch headphones.on && cmus +c
  21.         echo  $(date && echo "I want to eat ")  >> /home/NeverW8/lunch/he_wants_to_eat.log
  22.         fi
  23. done
  24.  
  25.  
  26. ############################
  27. #This is a joke.. come on! #
  28. ############################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement