Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site calmasd.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!harvard!talcott!panda!genrad!decvax!ittvax!dcdwest!sdcsvax!sdcc3!sdcc6!calmasd!rjh From: rjh@calmasd.UUCP (Bob Hofkin) Newsgroups: net.bugs.4bsd Subject: /usr/bin/style Message-ID: <338@calmasd.UUCP> Date: Thu, 25-Apr-85 14:29:58 EDT Article-I.D.: calmasd.338 Posted: Thu Apr 25 14:29:58 1985 Date-Received: Sun, 28-Apr-85 06:39:40 EDT Organization: Calma Company, San Diego, CA Lines: 29 Description: style permits output of long (-l flag) or complicated (-r flag) sentences. It barfs if you put both flags in a single request. Repeat-By: Take any text file, say FOO. Issue the command style -l 20 -r 12 FOO You will get an error message from deroff, and style aborts. Fix: The problem is a "for" loop in the style script. The -l and -r flags take an additional numeric parameter which isn't skipped by the for. The simplest fix (I don't claim to be a great shell wizard) is a switch to the "while" construct. I had to change references of $i to $1. This diff should do: 19,20c19,20 < while true; < do case $1 in --- > for i in $* > do case $i in 37c37 < -*) echo unknown style flag $1; exit;; --- > -*) echo unknown style flag $i; exit;;