#!/bin/sh export LANG=ja_JP.EUC-JP USER="Myname" PASSWORD="Secret" MES=$HOME/mes.txt KEITAI="Secret,too" POSTURL="http://twitter.com/statuses/update.xml" GETURL="http://twitter.com/statuses/friends_timeline.xml" nkf -w | sed '/^Subject/!d ; s/^Subject: //' >$MES if [ -s $MES ]; then curl -u $USER:$PASSWORD -d status="`cat $MES`" \ $POSTURL > /dev/null 2>&1 fi sleep 3 wget -q -O - --user=$USER --password=$PASSWORD $GETURL | sed \ ' /\|/!d ; s@\&@\&@g ; s@\<@\<@g ; s@\>@\>@g ; s@\"@"@g ; s@\ @ @g ; s@@

*\ @ ; s@@
@ ; s@@
\ by\ @ ; s@@

@ ' | \ w3m -O j -T text/html -cols 500 -dump | \ head -n41 | \ mail -s twitter $KEITAI echo -n "" > $MES