From owner-freebsd-current Fri Apr 12 01:25:25 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id BAA11046 for current-outgoing; Fri, 12 Apr 1996 01:25:25 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id BAA11018 for ; Fri, 12 Apr 1996 01:25:12 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id KAA11775; Fri, 12 Apr 1996 10:20:53 +0200 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id KAA27499; Fri, 12 Apr 1996 10:20:53 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id JAA09635; Fri, 12 Apr 1996 09:59:42 +0200 (MET DST) From: J Wunsch Message-Id: <199604120759.JAA09635@uriah.heep.sax.de> Subject: Re: /bin/sh's printf To: freebsd-current@FreeBSD.org (FreeBSD-current users) Date: Fri, 12 Apr 1996 09:59:41 +0200 (MET DST) Cc: erich@lodgenet.com (Eric L. Hernes) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199604111948.OAA07202@jake.lodgenet.com> from "Eric L. Hernes" at Apr 11, 96 02:48:50 pm X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL24 ME8a] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk As Eric L. Hernes wrote: > > I've stumbled across a little problem with sh's printf, > could someone explain what's going on here: > > (ttyp0@jake)$ /bin/sh > (ttyp0@jake)$ printf "%04d\n" 12 > 12 > (ttyp0@jake)$ /usr/bin/printf "%04d\n" 12 > 0012 > > > It looks like they're compiled from the same sources even --?? Except that the source has #ifdef SHELL hooks. Argl, yet another bogon in the shell. Please, file a PR for it. I'm going to deal with all the shell PR's i can resolve anytime soon, and will also see if 4.4BSD-Lite2 has already fixed something. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)