#!/bin/bash BOARD=$1 LISTING_HEADING="~~~~~~~~~~~~~~~~~~~" if [ -z "${BOARD}" ]; then echo "BOARDS" echo $LISTING_HEADING ssh $THREADCAT_USER "ls -lt /opt/threadcat | grep ^d" | awk '{print $9;}' echo "" echo "TOP LEVEL THREADS" echo $LISTING_HEADING ssh $THREADCAT_USER "ls -lt /opt/threadcat | grep -v ^d" | awk '{print ($6 " " $7 " " $8 " -- " $9);}' | grep -v '^[ \-]*$' else echo "BOARD: $BOARD" echo $LISTING_HEADING ssh $THREADCAT_USER "ls -lt /opt/threadcat/$BOARD | grep -v ^d" | awk '{print ($6 " " $7 " " $8 " -- " $9);}' | grep -v '^[ \-]*$' fi