X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:content-type :content-transfer-encoding:in-reply-to:references:date :message-id:mime-version; q=dns; s=default; b=hX5WjJie9xSIVfVpL+ CCpbg0tH0mgtDU+Nt7tDH7tWRNmWyBKGLENh6ho3t7wdeoc1u45FVY5U4daPjVby c8b91PX6d33+c8udQ2H5mRJG8hIOhjE7vEFrKnZbzRlHS181ZYFQTItXQq5z1yee zpbNrKcaf4WM7fKyFQVssZh7M= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:content-type :content-transfer-encoding:in-reply-to:references:date :message-id:mime-version; s=default; bh=S7HJtxezXTSwtw9jg4gjhHdz ABQ=; b=heWIpbBTvl42mcpkAOgXAB2+Yi7HTWuX+7/trhoCfITnX74cR7Cz4Yl0 p21DJHL1ywaHV4aJ6s05n44umtntCd+GU6AqmWYChZKJmZ3iFJjTTzh4sLtWrbZJ CSBZRvxZgJkalNLQnWkuam2uIafRo3mXVJ1L2Iu83XlYaYOpUQo= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mailout.ish.de X-Abuse-ID: hremUFXL0y-8240 AT umkbw DOT customer From: Helmut Karlowski To: cygwin AT cygwin DOT com Cc: cygwin AT cygwin DOT com Subject: Re: Rounding off real (floating point) values - bash to awk Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: References: Date: Thu, 26 Nov 2015 18:20:41 +0100 Message-Id: <20151126182041.6373EEF8.helmut.karlowski@ish.de> MIME-Version: 1.0 Outgoingd: 0.4.0_m1 X-IsSubscribed: yes --------------------------------------------------- > On Thu, Nov 26, 2015 at 10:29 AM, Steven Penny wrote: > > echo 3.7 | awk '{printf "%.0f", $0}' > > Another option > > awk 'BEGIN {printf "%.0f", ARGV[1]}' 3.7 #4: printf "%3.0f\n" 3.7 -Helmut -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple