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: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 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=-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: References: Date: Thu, 26 Nov 2015 10:33:19 -0600 Message-ID: Subject: Re: Rounding off real (floating point) values - bash to awk From: Steven Penny To: cygwin AT cygwin DOT 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