From owner-freebsd-questions Mon Apr 13 05:05:09 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA06217 for freebsd-questions-outgoing; Mon, 13 Apr 1998 05:05:09 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from indigo.ie (nsmart@ts01-28.waterford.indigo.ie [194.125.139.91]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA06197 for ; Mon, 13 Apr 1998 12:05:03 GMT (envelope-from rotel@indigo.ie) Received: (from nsmart@localhost) by indigo.ie (8.8.8/8.8.7) id NAA01088; Mon, 13 Apr 1998 13:03:57 +0100 (IST) (envelope-from rotel@indigo.ie) From: Niall Smart Message-Id: <199804131203.NAA01088@indigo.ie> Date: Mon, 13 Apr 1998 13:03:56 +0000 In-Reply-To: Dean Hollister "bash: multiplication" (Apr 13, 5:52pm) Reply-To: rotel@indigo.ie X-Mailer: Mail User's Shell (7.2.6 beta(3) 11/17/96) To: Dean Hollister , FreeBSD Questions Subject: Re: bash: multiplication Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Apr 13, 5:52pm, Dean Hollister wrote: } Subject: bash: multiplication > 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? Remember, * expands to the list of files in the current directory. time=`expr ${hrs} '*' 60` -- Niall Smart. Microsoft Suck. See www.freebsd.org for details. echo "#define if(x) if(!(x))" >> /usr/include/stdio.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message