aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-08-14 20:30:49 -0500
committerColin Okay <colin@cicadas.surf>2022-08-14 20:30:49 -0500
commit69a08e4dbc2e64994342c62d3afd918be3980fcb (patch)
tree975ed373a466d08945b764274ff3647d3e988799
parentfacbe35827c16669b83223c480f8929c722690a1 (diff)
[add] threadcat-read.sh
-rwxr-xr-xthreadcat-read.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/threadcat-read.sh b/threadcat-read.sh
new file mode 100755
index 0000000..291cf9e
--- /dev/null
+++ b/threadcat-read.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+CICADAS_USER=$1
+THREAD_NAME=$2
+
+if [ ! -z "${CICADAS_USER}" ]; then
+ if [ ! -z "${THREAD_NAME}" ]; then
+ ssh $CICADAS_USER@cicadas.surf "cat /opt/threadcat/$THREAD_NAME"
+ else
+ echo You did not provide a thread name.
+ echo USAGE: "cat <YOURMESSAGE> | threadcat-write USER THREAD_NAME"
+ fi
+else
+ echo You did not provide a user name.
+ echo USAGE: cat "<YOURMESSAGE> | threadcat-write USER THREAD_NAME"
+fi