Hi, i',m new to bash scripting and i have the following scrip,
PHP Code:
#!/bin/bash
# traveltime - a program to calculate how long it will
# take to travel a fixed distance
# syntax: traveltime miles mph
X60=$(($1 * 60))
TOTMINUTES=$(($X60 / $2))
HOURS=$(($TOTMINUTES / 60))
MINUTES=$(($TOTMINUTES % 60))
echo "The trip will take $HOURS hours and $MINUTES minutes"
however, when i try to executig it i get an error saying "traveltime: line 6: * 60: syntax error: operand expected (error token is "* 60")"
however, i can't see why it would say that. I though that would be ok. Can somebody tell me how i can solve this please. thanks