From owner-freebsd-questions Mon Apr 13 02:54:48 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA17968 for freebsd-questions-outgoing; Mon, 13 Apr 1998 02:54:48 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from odyssey.apana.org.au (odyssey.apana.org.au [203.11.114.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA17602 for ; Mon, 13 Apr 1998 02:52:06 -0700 (PDT) (envelope-from dean@odyssey.apana.org.au) Received: from localhost (dean@localhost) by odyssey.apana.org.au (8.8.7/8.8.7) with SMTP id RAA00767 for ; Mon, 13 Apr 1998 17:52:34 +0800 (WST) Date: Mon, 13 Apr 1998 17:52:33 +0800 (WST) From: Dean Hollister To: FreeBSD Questions Subject: bash: multiplication Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hiyall, Having more fun with bash... ;-) According to the expr man page, the following should work: #!/bin/bash hrs=20 mins=10 time=`expr ${hrs} * 60` time=`expr ${time} + ${mins}` However, it falls over (syntax error) on the first expr line. Any ideas? Regards, d. +-------------------------------------------------------+ | Dean Hollister, | dean@odyssey.apana.org.au | | Perth, Western Australia. | deanh@iinet.net.au | +-------------------------------------------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message