#!/bin/bash THREAD_NAME=$1 if [ ! -z "${THREAD_NAME}" ]; then cat - | ssh $THREADCAT_USER "umask 002 && echo `whoami` -- `date` >> /opt/threadcat/$THREAD_NAME && cat - >> /opt/threadcat/$THREAD_NAME" echo Posted to $THREAD_NAME else echo You did not provide a thread name. echo USAGE: "cat | threadcat write THREAD_NAME" fi