[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: BASH question



M.Lewis wrote:

I thought this was simple, but I've not yet been able to figure out what is wrong.

#!/bin/sh

PERMINUTE=$((28.95/432000))
echo "$PERMINUTE"


What I'm looking for is $PERMINUTE to be the value of 28.95/43200.

I thought I had the syntax correct, but when I execute it I get:

./calc2.sh: line 3: 28.95/432000: syntax error in expression (error token is ".95/432000")

Any ideas?

Thanks,
Mike

maybe $man bash can help you a lot, try using (,) comma, instead of (.) dot

--
Regards,
Johannes Sitorus
PT Pacific Communication Networks
Wisma Indovision lt.12
Jl. Raya Panjang Z/III 11520
Tel. 021-5830-2430
Fax. 021-5830-2431


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]