I think this will work (modified from an rc script of mine):

while (! ~ $#* 0 && ~ $1 -* && ! ~ $1 --) {
        switch ($1) {
        case -a;        destsonly=yes
        case -b;        copies=($copies $2) ; shift
        case -c;        copies=($copies $user)
        case -v;        verbose=yes
        case -*
                echo usage: $0 '[-acv] [-b bcc] [file]...' >[1=2]
                exit usage
        }
        shift
}
# process $*, which now lacks options ...

I think this is the only situation in which I used to wish for `break'
in rc, but it no longer seems worthwhile.

Reply via email to