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