From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Nepbg-00014S-JI for mharc-grub-devel@gnu.org; Tue, 09 Feb 2010 07:54:20 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nepbf-00013d-9g for grub-devel@gnu.org; Tue, 09 Feb 2010 07:54:19 -0500 Received: from [199.232.76.173] (port=34100 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nepbe-00012p-Jw for grub-devel@gnu.org; Tue, 09 Feb 2010 07:54:18 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nepbc-0001ke-Pv for grub-devel@gnu.org; Tue, 09 Feb 2010 07:54:18 -0500 Received: from smarthost03.mail.zen.net.uk ([212.23.3.142]:55025) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nepbc-0001kS-HZ for grub-devel@gnu.org; Tue, 09 Feb 2010 07:54:16 -0500 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost03.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1NepbZ-0001Mx-5h for grub-devel@gnu.org; Tue, 09 Feb 2010 12:54:13 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1NepbY-0002XS-00; Tue, 09 Feb 2010 12:54:12 +0000 Date: Tue, 9 Feb 2010 12:54:12 +0000 From: Colin Watson To: The development of GNU GRUB Message-ID: <20100209125412.GP4409@riva.ucam.org> References: <20100207150256.GC4409@riva.ucam.org> <4B715875.5040706@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4B715875.5040706@gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost03-IP: [82.69.40.219] X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] --foo bar cmdline argument parsing support for grub-* scripts X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2010 12:54:19 -0000 On Tue, Feb 09, 2010 at 01:43:33PM +0100, Grégoire Sutre wrote: > BVK Chaitanya wrote: >> I assume you are talking about /usr/bin/getopt (not libc getopt). >> /usr/bin/getopt comes with util-linux package (in debian), and yes, I >> too dont think it would be available on other platforms as bash or >> coreutils does. > > You might want to use the POSIX shell built-in getopts instead of the > getopt binary. > > http://www.opengroup.org/onlinepubs/9699919799/utilities/getopts.html > > This built-in is supported by bash, ksh, NetBSD sh, and surely many > other shells. But it doesn't support long options, so it is useless here. -- Colin Watson [cjwatson@ubuntu.com]