aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-08-15 08:12:42 -0500
committerColin Okay <colin@cicadas.surf>2022-08-15 08:12:42 -0500
commit46c2551958cf61427a681793c91d888e1c2e1ab4 (patch)
treeb22e7692a736d23569d6c54e6f78353c615d4b41
parent122a79330234ce3ffae277165a5c859e644b5208 (diff)
[modify] write script to insert newline before each post
-rwxr-xr-xthreadcat-write.sh4
1 files changed, 3 insertions, 1 deletions
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.