Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jun 2004 06:49:35 +0400
From:      Sergey Zaharchenko <doublef@tele-kom.ru>
To:        Warren Block <wblock@wonkity.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: command-line calculator?
Message-ID:  <20040626024935.GA16644@shark.localdomain>
In-Reply-To: <20040625132917.U21716@wonkity.com>
References:  <36fb6de804062508417917d0b8@mail.gmail.com> <20040625183429.GA10616@moo.holy.cow> <20040625132917.U21716@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Kj7319i9nmIyA2yE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jun 25, 2004 at 01:31:33PM -0600,
 Warren Block probably wrote:
> On Fri, 25 Jun 2004, Parv wrote:
>=20
> > Perl:
> >   perl -e 'print +(17 * 36)'
>=20
> Or just
>=20
>      perl -e 'print 17 * 36'
>=20
> but for neatness
>=20
>      perl -e 'print 17 * 36, "\n"'

Or just

$ sh -c 'echo $((17*36))'
612

or

$ echo $((17*36))

if you use sh as your interactive shell.

--=20
DoubleF
The first time, it's a KLUDGE!
The second, a trick.
Later, it's a well-established technique!
		-- Mike Broido, Intermetrics

--Kj7319i9nmIyA2yE
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFA3OQ9wo7hT/9lVdwRAiLUAJ9hEeVjggG6lH2R25HHqIoEe5ngPwCfe2Fs
B9spB9/E654ELed05Od7DYU=
=z0i4
-----END PGP SIGNATURE-----

--Kj7319i9nmIyA2yE--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040626024935.GA16644>