View Single Post
Old 2021-10-03, 12:32   #5
M344587487
 
M344587487's Avatar
 
"Composite as Heck"
Oct 2017

90010 Posts
Default

At first I thought you were using the expr utility and passing a number to yafu so noodled with that, but you're actually passing the string "expr(a*b)" to be evaluated by yafu (?) (sorry, unfamiliar with yafu). Either way you may need to delimit * so that it doesn't get substituted by the shell, and/or include spaces between the variables and the operator if yafu works like expr. Any difference in how you're calling the scripts that may let one substitute and the other not?
Code:
u20@u20:~/textdir$ jam="$(expr -2293531595601876 * 3)";echo $jam
expr: syntax error: unexpected argument ‘file_in_cd’

u20@u20:~/textdir$ jam="$(expr -2293531595601876 \* 3)";echo $jam
 -6880594786805628

u20@u20:~/textdir$ jam="$(expr -2293531595601876\*3)";echo $jam
-2293531595601876*3
M344587487 is offline   Reply With Quote