X-Recipient: archive-cygwin@delorie.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:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; q=dns; s=default; b=bZ
	ydX1Jt6PkntUNLr9bvNTcKJar/PpyKt1Z/k2xL6PgGjQrZ+1EZHeU59S6A4joQ2w
	cvK6bvwO3R/F6sMatQfrg3gx8ajGiUEvff6XAlYi8d+4SB30mcz9SqYe228C8FRa
	or4ssSZXuXmiDyTbBFATOaE2tIaaYRQZJ6dTfHVP0=
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:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; s=default; bh=N006mxah
	qiySl8stFM+fMea+RcY=; b=Zf+jFc5Ns6kK1mxhtQ3XC0b1824LpFKAmbyWK+Gh
	+aye0MpRGyeMsOAAO+uOqkQu9gPQBXw3ZX97kvEPGiSPg80HQGHSVWOiQ5XU6jwT
	2OU22JhzsS3oCDH/VIODZRwue6Gsgk75oXl+BdDK2iPjoIV4rDZx/PWQErARsgqe
	e1U=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-ig0-f178.google.com
MIME-Version: 1.0
X-Received: by 10.50.12.42 with SMTP id v10mr3745441igb.85.1448555599320; Thu, 26 Nov 2015 08:33:19 -0800 (PST)
In-Reply-To: <CAAXzdLWK6hexdYcQM6CcvxVmE=ctyTqnYYHN_r+B6qC-8thVFw@mail.gmail.com>
References: <CAE3taFBHyMhcGB=ux5xYVxcLM13G2JRpuTyDG-NtuSrp=eOhmQ@mail.gmail.com>	<CAAXzdLWK6hexdYcQM6CcvxVmE=ctyTqnYYHN_r+B6qC-8thVFw@mail.gmail.com>
Date: Thu, 26 Nov 2015 10:33:19 -0600
Message-ID: <CAAXzdLWU8LGBvnXM2Fa+TzFYAfoo0tQ0_kYQJXbJuqe930KhaQ@mail.gmail.com>
Subject: Re: Rounding off real (floating point) values - bash to awk
From: Steven Penny <svnpenn@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
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

--
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

