Mercurial > hg > Applications > mh
view miscellany/mtrenv/bin/sscan @ 0:bce86c4163a3
Initial revision
author | kono |
---|---|
date | Mon, 18 Apr 2005 23:46:02 +0900 |
parents | |
children |
line wrap: on
line source
: 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