Poor Yorick wrote:
> (on my debian system, bashbug reports for bash 2.05)

Is that a Sarge system?  Note that Etch is now the Debian Stable
release.  However that won't change the results from the problem that
you are have reported.

> printf status is 0 but /usr/bin/printf is 1.  Is this the expected behavior?

On a Sarge system:

  $ type printf
  printf is a shell builtin

  $ /usr/bin/printf --version
  printf (GNU coreutils) 5.2.1

This indicates that those are different printf implementations.

> [EMAIL PROTECTED]:~$ bash3
> [EMAIL PROTECTED]:~$ bash3 --version
> GNU bash, version 3.00.16(1)-release (i386-pc-linux-gnu)
> Copyright (C) 2004 Free Software Foundation, Inc.
> [EMAIL PROTECTED]:~$ printf '\x'
> bash3: printf: missing hex digit for \x
> [EMAIL PROTECTED]:~$ echo $?
> 0

That appears to be a bug to me.  Because printf failed it should
return a non-zero exit code.  I just checked the current 3.2 patch 17
and see no change in that behavior.

> [EMAIL PROTECTED]:~$ /usr/bin/printf '\x'
> /usr/bin/printf: missing hexadecimal number in escape
> [EMAIL PROTECTED]:~$ echo $?
> 1

This appears to be the correct behavior.

Bob


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to