aboutsummaryrefslogtreecommitdiffhomepage
path: root/threadcat-write.sh
diff options
context:
space:
mode:
Diffstat (limited to 'threadcat-write.sh')
-rwxr-xr-xthreadcat-write.sh20
1 files changed, 7 insertions, 13 deletions
diff --git a/threadcat-write.sh b/threadcat-write.sh
index e328fc2..78b436f 100755
--- a/threadcat-write.sh
+++ b/threadcat-write.sh
@@ -1,20 +1,14 @@
#!/bin/bash
-CICADAS_USER=$1
-THREAD_NAME=$2
+THREAD_NAME=$1
-
-if [ ! -z "${CICADAS_USER}" ]; then
- if [ ! -z "${THREAD_NAME}" ]; then
- cat - | ssh $CICADAS_USER@cicadas.surf "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 <YOURMESSAGE> | threadcat-write USER THREAD_NAME"
- fi
+if [ ! -z "${THREAD_NAME}" ]; then
+ cat - | ssh $CICADAS_USER@cicadas.surf "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 user name.
- echo USAGE: cat "<YOURMESSAGE> | threadcat-write USER THREAD_NAME"
+ echo You did not provide a thread name.
+ echo USAGE: "cat <YOURMESSAGE> | threadcat write THREAD_NAME"
fi
+