blob: 93811624850718c9e56548694d2a89db2d55d59a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/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 '{ s = ""; for (i = 6; i <= 9; i++) s = s $i " "; print s }'
echo ""
echo "TOP LEVEL THREADS"
echo $LISTING_HEADING
ssh $THREADCAT_USER "ls -lt /opt/threadcat | grep -v ^d" | awk '{ s = ""; for (i = 6; i <= 9; i++) s = s $i " "; print s }' | grep -v '^ *$'
else
echo "LISTING THREADS UNDER $BOARD"
echo $LISTING_HEADING
ssh $THREADCAT_USER "ls -lt /opt/threadcat/$BOARD | grep -v ^d" | awk '{ s = ""; for (i = 6; i <= 9; i++) s = s $i " "; print s }' | grep -v '^ *$'
fi
|