From 69a08e4dbc2e64994342c62d3afd918be3980fcb Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Sun, 14 Aug 2022 20:30:49 -0500 Subject: [add] threadcat-read.sh --- threadcat-read.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 threadcat-read.sh 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 | threadcat-write USER THREAD_NAME" + fi +else + echo You did not provide a user name. + echo USAGE: cat " | threadcat-write USER THREAD_NAME" +fi -- cgit v1.2.3