From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 30 18:00:43 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F0621065680 for ; Tue, 30 Jun 2009 18:00:43 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from mail-fx0-f218.google.com (mail-fx0-f218.google.com [209.85.220.218]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC318FC0C for ; Tue, 30 Jun 2009 18:00:42 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: by fxm18 with SMTP id 18so295602fxm.43 for ; Tue, 30 Jun 2009 11:00:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=pAGyP77lu9JhOJsLCTfpB0u0fWagsMd1nimeN41aLTI=; b=snDoMoYB0y1ku8D6mOktTq4XqjX5VwrSZ7bkYYjqaLhfQ2xvGlQbDmsogYxiF14Ruo uDfg5ihC017KH/UtwD83sj3BVWTMXbJ/0u35JHMTfXctMiJAdZIJewA7b1WwJ0k7cAFj 9QQyRXImgGE6HkwCqTjPAGjqaOUXog6bL1Il0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=Jav4wrS3dxSlB7QnFDCffEsnXp9Irsq69x/yk9oSAExi8pP9MV//XhZQo1ba/BXiGg iIxYsZyZL1wYyw2wzaKrYeBqtzBcxdahtUO/68rPz9wl0KkAh+Dab5Jdou23ujBAtvLw AyEg67GlrxrXyUzNBCs04TcoLOlQBGzXKwAx0= MIME-Version: 1.0 Sender: mozolevsky@gmail.com Received: by 10.204.63.8 with SMTP id z8mr8577135bkh.55.1246384841312; Tue, 30 Jun 2009 11:00:41 -0700 (PDT) In-Reply-To: References: From: Igor Mozolevsky Date: Tue, 30 Jun 2009 19:00:21 +0100 X-Google-Sender-Auth: 28b50dff6e48e35f Message-ID: To: Alexander Best Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: c question: *printf'ing arrays X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2009 18:00:43 -0000 2009/6/30 Alexander Best : > that works, but i really want to have a pretty output to stdout. i guess i > have to stick with printf and use `for (i=0; i < sizeof(XXX); i++)` for each > array in the struct. just thought i could avoid it. > > btw. `./my-program | hexdump` works, but if i do `./my-program > output` > output is being created, but is empty. is this normal? Depends if you output to stdout or stderr --- `>' redirects stdout. Cheers, -- Igor