Subject: bin/32340: rs doesn't parse options POSIXly
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <mlelstv@serpens.de>
List: netbsd-bugs
Date: 12/19/2005 17:30:01
>Number: 32340
>Category: bin
>Synopsis: rs doesn't parse options POSIXly
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 19 17:30:01 +0000 2005
>Originator: mlelstv@serpens.de
>Release: NetBSD 3.0_RC6
>Organization:
>Environment:
System: NetBSD henery 3.0_RC6 NetBSD 3.0_RC6 (HENERY) #9: Sun Dec 18 16:51:20 CET 2005 src@henery:/usr/obj/home/src/sys/arch/i386/compile/HENERY i386
Architecture: i386
Machine: i386
>Description:
rs doesn't accept options in a standard matter.
% echo 1 2 3 4 | rs -w 120
rs: Width must be a positive integer
usage: rs [ -[csCS][x][kKgGw][N]tTeEnyjhHm ] [ rows [ cols ] ]
% echo 1 2 3 4 | rs -w120
1 2 3 4
The reason is that it does not use getopt but invents its own
command line parser that wants option arguments to be padded
directly to the option character.
The same is true for all the other options that accept an argument.
>How-To-Repeat:
See above.
>Fix:
Rewrite the option parser using getopt if the standard gods allow it.
>Unformatted: