Permalink
Browse files

Merge branch 'master' of https://github.com/teddziuba/hubot

  • Loading branch information...
2 parents 3ff49fe + c43056d commit 8421a34bc92c84f93e37bcba9350c668e067a5d1 @twinshadow twinshadow committed Dec 4, 2011
Showing with 10 additions and 8 deletions.
  1. +10 −8 bin/plugins/ping
View
@@ -1,10 +1,12 @@
#!/bin/bash
-
-echo "$1" | grep -q "^PING$" && echo "PONG"
-
-echo "$1" | grep -q "^ECHO " && echo ${1:5}
-
-echo "$1" | grep -q "^TIME$" && date
-
-echo "$1" | grep -q "^HOST$" && uname -a
+case "$1" in
+ PING)
+ echo PONG;;
+ "ECHO "*)
+ echo ${1:5};;
+ TIME)
+ date;;
+ HOST)
+ uname -a;;
+esac

0 comments on commit 8421a34

Please sign in to comment.