Poor Yorick wrote: > (on my debian system, bashbug reports for bash 2.05) > > printf status is 0 but /usr/bin/printf is 1. Is this the expected behavior? > > [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
Bash treats unrecognized backslash escapes as characters to be printed and does not consider them an error. \x without any hex digits doesn't have any special meaning, though, since it's probably not what's intended, bash prints a warning. Chet > [EMAIL PROTECTED]:~$ /usr/bin/printf '\x' > /usr/bin/printf: missing hexadecimal number in escape > [EMAIL PROTECTED]:~$ echo $? > 1 > -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. No day but today. Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://cnswww.cns.cwru.edu/~chet/ _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash