From owner-freebsd-questions Sat May 16 06:36:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA15243 for freebsd-questions-outgoing; Sat, 16 May 1998 06:36:25 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from pobox.com (narn-2-88.mdm.mke.execpc.com [169.207.134.216]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id GAA15216 for ; Sat, 16 May 1998 06:36:21 -0700 (PDT) (envelope-from hamilton@pobox.com) Message-Id: <199805161336.GAA15216@hub.freebsd.org> Received: (qmail 14407 invoked from network); 16 May 1998 08:38:09 -0500 Received: from localhost (HELO pobox.com) (127.0.0.1) by localhost with SMTP; 16 May 1998 08:38:09 -0500 To: Child Cc: questions@FreeBSD.ORG Subject: Re: sh/csh sums? In-reply-to: Your message of "Sat, 16 May 1998 00:31:23 CDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 16 May 1998 08:38:09 -0500 From: Jon Hamilton Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message , Child w rites: } HI all } } I am looking for a way to get sh/csh to do simple sums } ie 145553/1024 } } thanks } JS To pick a nit, that's not a sum, but to answer your question as it applies to sh: $ echo $((145553/1024)) 142 Most older versions of sh will either not have this feature, or it'll be limited to addition and subtraction. Newer (POSIX-ized) versions generally do OK in this regard. -- Jon Hamilton hamilton@pobox.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message