diff options
author | Colin Okay <colin@cicadas.surf> | 2022-08-17 08:33:41 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-08-17 08:33:41 -0500 |
commit | 40707d12d1a5edc98afd862b68da8fd525257600 (patch) | |
tree | 1613b22122df2cc406aa11de8d75fd23ab865b3a | |
parent | 979363476bb86e10b34e797da4d4c16e39f9383f (diff) |
[modify] threadcat-read to include colorized headings
-rwxr-xr-x | threadcat-read.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/threadcat-read.sh b/threadcat-read.sh index 424dc55..9d6012b 100755 --- a/threadcat-read.sh +++ b/threadcat-read.sh @@ -10,7 +10,14 @@ else fi if [ ! -z "${THREAD_NAME}" ]; then - ssh $THREADCAT_USER "cat /opt/threadcat/$THREAD_NAME" + readarray -t lines < <(ssh $THREADCAT_USER "cat /opt/threadcat/$THREAD_NAME") + for line in "${lines[@]}"; do + if [[ $line =~ ^=== ]]; then + echo -e "\e[0;36m$line\e[0m" + else + echo $line; + fi + done else echo You did not provide a thread name. echo USAGE: "threadcat read [BOARD] THREAD" |