File:  [CSRG BSD Unix] / 43BSDReno / contrib / mh / miscellany / mtrenv / bin / sscan
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:56 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

: run this script through /bin/sh

if mhpath all > /dev/null; then true; else exit 1; fi

if [ "x$1" = x ]; then
    S=`scan -format %subject first`
    if [ "x$S" = x ]; then mark -add -zero -sequence select first; fi
else
    S="$1"
fi

if [ "x$2" != x ]; then echo 'usage: sscan [subject]' 1>&2; exit 1; fi

if [ "x$S" != x ]; then
    S=`echo $S | tr A-Z a-z | sed -e 's%^re:%%' | sed -e 's%^[ 	]*%%'` 
    if pick -subject "$S" -zero -sequence select; then true; else exit 1; fi
fi

sortm select; scan select

exit 0

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.