Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Apr 1998 17:52:33 +0800 (WST)
From:      Dean Hollister <dean@odyssey.apana.org.au>
To:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   bash: multiplication
Message-ID:  <Pine.BSF.3.96.980413175037.434A-100000@odyssey.apana.org.au>

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

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980413175037.434A-100000>