Skip to content

Instantly share code, notes, and snippets.

@ryu22e
Created October 16, 2010 15:31
Show Gist options
  • Save ryu22e/629908 to your computer and use it in GitHub Desktop.
Save ryu22e/629908 to your computer and use it in GitHub Desktop.
tiarraの最新ログをviewで開くスクリプト
#!/bin/sh
CHANNEL_NAME=$1
if [ -z $CHANNEL_NAME ];
then
echo "Channel name is empty." > /dev/fd/2
exit 1
fi
TIARRA_PATH=/home/ryu22e/tiarra
FILE_NAME=`date '+%Y.%m.%d.txt'`
LOG_PATH=$TIARRA_PATH/log/$CHANNEL_NAME/$FILE_NAME
if [ -e $LOG_PATH ];
then
view $LOG_PATH
else
echo "$LOG_PATH is not found." > /dev/fd/2
exit 1
fi
@ryu22e
Copy link
Author

ryu22e commented Oct 16, 2010

Usage

view-tiarra-latest-log.sh "#twitter@tig"
view-tiarra-latest-log.sh "#wassr@wig"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment