]> Sergey Matveev's repositories - mmc.git/blob - cmd/sb/all
Simpler scrollback history getter
[mmc.git] / cmd / sb / all
1 #!/bin/sh -e
2
3 cmd="$(dirname "$(realpath -- "$0")")"
4 dir=`dirname $1`
5 dir=${dir##*/}
6 [ "$dir" = chans ] || direct="-direct"
7 $cmd/sb -whole $direct `cat $1/id` > $1/out.rec.tmp
8 mv $1/out.rec.tmp $1/out.rec
9 recsel --collapse --print-values=Id < $1/out.rec | tail -1 > $1/last