x="*.log"
o=""
-if [ "$1" = "-r" ];then
- o="-r"
- shift
-fi
-if [ "$1" = "log" ];then
- x="*.sum"
- o="-r"
- shift
-fi
+while true;do
+ if [ "$1" = "-r" ];then
+ o="$o -r"
+ shift
+ continue
+ fi
+ if [ "$1" = "-N" ];then
+ o="$o -N"
+ shift
+ continue
+ fi
+ if [ "$1" = "log" ];then
+ x="*.sum"
+ o="-r"
+ shift
+ continue
+ fi
+ break
+done
if [ $# != 2 ];then
echo >&2 "$0 hammock/xxxxyyzzname hammock/XXXXYYZZothername"