Date: Tue, 12 Jul 2011 21:48:37 GMT From: freethread <freethread.sw@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/158846: printf error if format string begin with a dash '-' Message-ID: <201107122148.p6CLmb9j042588@red.freebsd.org> Resent-Message-ID: <201107122150.p6CLoAe9036999@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 158846
>Category: misc
>Synopsis: printf error if format string begin with a dash '-'
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Jul 12 21:50:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: freethread
>Release: 8.2 RELEASE
>Organization:
>Environment:
FreeBSD alpha.freethread.lan 8.2-RELEASE FreeBSD 8.2-RELEASE #1: Wed Mar 30 00:29:15 CEST 2011 root@alpha.freethread.lan:/usr/obj/usr/src/sys/ALPHA i386
>Description:
using the following command (inline or in script)
printf "-h, --help show help"
the printf command raise the error
printf: illegal option -- h
usage: printf format [arguments ...]
it should be ok if printf accept options, but this is not the case (as in the previous message):
usage: printf format [arguments ...]
workarounds:
printf "\-h, --help show help"
printf "%s" "-h, --help show help"
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107122148.p6CLmb9j042588>
