How do you perform a multiplication in shell script?

How do you perform a multiplication in shell script?
Answer
Multiplication of two numbers using expr in shell script
In shell, * represents all files in the current directory. So, in order to use * as a multiplication operator, we should escape it like *. If we directly use * in expr, we will get error message.
 

Tìm kiếm

Back
Top