GNU bug report logs - #45890
Printf bug GNU coreutils 8.30/8.32

Previous Next

Package: coreutils;

Reported by: Andrea Dari <andreadari <at> protonmail.com>

Date: Fri, 15 Jan 2021 12:11:01 UTC

Severity: normal

Tags: notabug

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andrea Dari <andreadari <at> protonmail.com>
To: 45890 <at> debbugs.gnu.org
Subject: bug#45890: Printf bug GNU coreutils 8.30/8.32
Date: Fri, 15 Jan 2021 11:08:58 +0000
[Message part 1 (text/plain, inline)]
Hello,

I'm using GNU coreutils 8.30, I found that the printf tool is broken while coding a shell script.

andrea <at> Workstation:~$ printf --version
bash: printf: --: invalid option
printf: usage: printf [-v var] format [arguments]

I tried with coreutils 8.32 too with the same error.

PRINTF(1) man page reports the option valid:

NAME
printf - format and print data

SYNOPSIS
printf FORMAT [ARGUMENT]...
printf OPTION

DESCRIPTION
Print ARGUMENT(s) according to FORMAT, or execute according to OPTION:

--help display this help and exit

--version
output version information and exit
...

the option --help works.

I have another issue with printf, I wanted to print a string that starts with "-" and printf parse it like an option:

andrea <at> Workstation:~$ printf "->"
bash: printf: ->: invalid option
printf: usage: printf [-v var] format [arguments]

I'm doing something wrong?

Best Regards,

Andrea Dari
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 126 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.