From owner-freebsd-questions@FreeBSD.ORG Tue Aug 24 06:15:53 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9EC7A16A4CE for ; Tue, 24 Aug 2004 06:15:53 +0000 (GMT) Received: from hotmail.com (bay10-f42.bay10.hotmail.com [64.4.37.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E01643D54 for ; Tue, 24 Aug 2004 06:15:53 +0000 (GMT) (envelope-from gs_stoller@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 23 Aug 2004 23:15:53 -0700 Received: from 4.237.32.127 by by10fd.bay10.hotmail.msn.com with HTTP; Tue, 24 Aug 2004 06:15:53 GMT X-Originating-IP: [4.237.32.127] X-Originating-Email: [gs_stoller@hotmail.com] X-Sender: gs_stoller@hotmail.com From: "Gerald S. Stoller" To: freebsd-questions@FreeBSD.ORG Date: Tue, 24 Aug 2004 02:15:53 -0400 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 24 Aug 2004 06:15:53.0367 (UTC) FILETIME=[CF49B270:01C489A1] Subject: The printf function X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2004 06:15:53 -0000 I executed the following printf (in a Korn shell command-line) printf 't %2$s .\n' 3 55 and got the following response printf: illegal format character $ The following is an excerpt from the man-3 page for printf . Each conversion specification is introduced by the character %. The arguments must correspond properly (after type promo- tion) with the conversion specifier. After the %, the following appear in sequence: o An optional field, consisting of a decimal digit string followed by a $, specifying the next argument to access . If this field is not provided, the argument following the last argument accessed will be used. Arguments are numbered starting at 1. If unaccessed arguments in the format string are interspersed with ones that are accessed the results will be indeterminate. The printf should have produced "t 55 ." as output. Can we please get it fixed?!?! My system is FreeBSD 4.3 on: FreeBSD 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Sat Apr 21 10:54:49 GMT 2001 jkh@narf.osd.bsdi.com:/usr/src/sys/compile/GENERIC i386 _________________________________________________________________ Get ready for school! Find articles, homework help and more in the Back to School Guide! http://special.msn.com/network/04backtoschool.armx