Initial Commit
[packages] / xemacs-packages / mew / mew / contrib / imls.sh
1 #!/bin/sh
2
3 # imls.sh: emulate imget program using MH's scan
4 #   options
5 #     --src=+inbox    -> +inbox
6 #     --width=80      -> -width 80
7 #     other options   -> ignore
8 #
9
10 mhdir=/usr/local/bin/mh
11 arg=
12
13 for opt in $*
14 do
15     case $opt in
16         -*=*) optarg=`echo $opt | sed 's/[-_a-zA-Z0-9]*=//'` ;;
17         *) optarg= ;;
18     esac
19     
20     case $opt in
21         --width=*)
22             arg="$arg -width $optarg"
23             ;;
24         --src=*)
25             arg="$arg $optarg"
26             ;;
27         --*)
28             ;;  # ignore
29         *)
30             arg="$arg $opt"
31             ;;
32     esac
33 done
34
35 exec $mhdir/scan $arg | sed 's/^\( *[0-9]*\)+/\1 /'