anju_a_sagar
asked on
operand expected
Dear All,
I m trying to execute this command
X60=$(($1 * 60))
error showing : operand expected (error token is " * 60")
TOTMINUTES=$(($X60 / $2))
error : operand expected (error token is "/")
how to eliminate this error
do i need to define using awk?
thanks
I m trying to execute this command
X60=$(($1 * 60))
error showing : operand expected (error token is " * 60")
TOTMINUTES=$(($X60 / $2))
error : operand expected (error token is "/")
how to eliminate this error
do i need to define using awk?
thanks
are $1 and $2 defined?
ASKER
no how can i define them?
i know abt normal variables
can u plz explain
i know abt normal variables
can u plz explain
What did you want to multiply by 60?
What did you want to divide it by?
What did you want to divide it by?
ASKER
awk -f traveltime "$1" "$2"
is it like this
is it like this
ASKER
i want to give those variables as user input
like this
traveltime 90 40
90 for $1 and 40 for $2
like this
traveltime 90 40
90 for $1 and 40 for $2
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
do i need to write in a file and save it with particular extension?
ASKER
X60=$(($1 * 60))
when i run this command
the following error is coming
-bash: * 60 : syntax error : operand expected (error token is "* 60")
when i run this command
the following error is coming
-bash: * 60 : syntax error : operand expected (error token is "* 60")
ASKER
thanks