From owner-freebsd-hackers Tue Oct 22 09:39:48 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA10709 for hackers-outgoing; Tue, 22 Oct 1996 09:39:48 -0700 (PDT) Received: from Campino.Informatik.RWTH-Aachen.DE (campino.Informatik.RWTH-Aachen.DE [137.226.225.2]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id JAA10574 for ; Tue, 22 Oct 1996 09:37:33 -0700 (PDT) Received: from gilberto.physik.rwth-aachen.de (gilberto.physik.rwth-aachen.de [137.226.31.2]) by Campino.Informatik.RWTH-Aachen.DE (RBI-Z-5/8.6.12) with ESMTP id RAA21144 for ; Tue, 22 Oct 1996 17:36:50 +0100 Received: (from kuku@localhost) by gilberto.physik.rwth-aachen.de (8.6.11/8.6.9) id RAA22495 for freebsd-hackers@freefall.cdrom.com; Tue, 22 Oct 1996 17:41:54 +0100 Date: Tue, 22 Oct 1996 17:41:54 +0100 From: Christoph Kukulies Message-Id: <199610221641.RAA22495@gilberto.physik.rwth-aachen.de> To: freebsd-hackers@freefall.FreeBSD.org Subject: getopt(1) man page woodoo Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk ..... DESCRIPTION Getopt is used to break up options in command lines for easy parsing by shell procedures, and to check for legal options. [Optstring] is a string of recognized option letters (see getopt(3) ); if a letter is fol- lowed by a colon, the option is expected to have an argument which may or may not be separated from it by white space. The special option is used to delimit the end of the options. Getopt will place in the arguments at the end of the options, or recognize it if used explicitly. The shell arguments ($1 $2 ...) are reset so that each option is preceded by a and in its own shell argument; each option argument is also in its own shell argument. ..... See the missing -- and - ? But they are in The special option .B \-\- is used to delimit the end of the options. .Nm Getopt will place .B \-\- in the arguments at the end of the options, or recognize it if used explicitly. The shell arguments (\fB$1 $2\fR ...) are reset so that each option is preceded by a .B \- and in its own shell argument; What's going on here? --Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de