- Get a list of messages from "mhpath all" or "mhpath cur:-N cur:N"
Clever. That solves the problem I was having with pick doing this in
Bourne shell.
I believe this will work, and doesn't have the problem with gaps in
message numbers that kre's script does.
pre=$((`mhpath cur:-$n|wc -l`))
if [ $((2*$pre)) -lt $n ]; then
post=$(($n-$pre))
else
post=$((`mhpath next:$(($n/2))|wc -l`))
pre=$(($n-$post))
fi
if [ $pre -gt 0 ]; then
if [ $post -gt 0 ]; then
scan cur:-$pre next:$post
else
scan cur:-$pre
else
scan next:$post
fi
That's the basic idea, anyway, which is the same as the awk script I
posted earlier. You'll want to change it so you can choose middle numbers
other than "cur".
Cheers,
- Joel
_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers