[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] floating point arithmetic

From: Chris F.A. Johnson
Subject: Re: [Help-bash] floating point arithmetic
Date: Tue, 31 Oct 2017 17:08:33 -0400 (EDT)
User-agent: Alpine 2.10 (DEB 1266 2009-07-14)

On Tue, 31 Oct 2017, João Eiras wrote:

I have my own little bash script for this use case:

$ cat calc
awk "BEGIN { print (${*:-0}); }" /dev/null

I use this:

  awk 'BEGIN {print '"${*//x/*}"'}'
} that I can use 'x' instead of '*', which needs quoting.

Chris F.A. Johnson, <>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]