From 46c2551958cf61427a681793c91d888e1c2e1ab4 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Mon, 15 Aug 2022 08:12:42 -0500 Subject: [modify] write script to insert newline before each post --- threadcat-write.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/threadcat-write.sh b/threadcat-write.sh index aff794b..c3c48d6 100755 --- a/threadcat-write.sh +++ b/threadcat-write.sh @@ -1,9 +1,11 @@ #!/bin/bash THREAD_NAME=$1 +THREAD_PATH="/opt/threadcat/$THREAD_NAME" + if [ ! -z "${THREAD_NAME}" ]; then - cat - | ssh $THREADCAT_USER "umask 002 && echo `whoami` -- `date` >> /opt/threadcat/$THREAD_NAME && cat - >> /opt/threadcat/$THREAD_NAME" + 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. -- cgit v1.2.3