#!/bin/sh RFILE="search.rb" DIR=$SOME_DIR ERROR_1="There is no rexml file" ERROR_2="There is no keyword" if [ ! -f ${DIR}/${RFILE} ]; then echo $ERROR_1 exit 1 fi if [ ! "$1" ]; then echo $ERROR_2 exit 2 fi S_URL="http://search.twitter.com/search.atom?q=" KEYWORD="$*" LOCALE="&locale=ja" URL=${S_URL}${KEYWORD}${LOCALE} wget -q $URL -O temp.$$ ruby ${DIR}/$RFILE temp.$$ | tac