View Single Post
Old 2021-10-02, 20:18   #3
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

32×7×73 Posts
Default

Quote:
Originally Posted by fivemack View Post
What happens if you replace the '$(../../yafu/yafu' with '$(echo' ? That error message is coming from yafu not from bash (that is, yafu's output is that error message and has been captured into $c4m), so it looks as if the thing going into yafu has been somehow garbled ...
I cannot detect a difference. Script that works:
Code:
c4 is 2346021463111956 and am is 3
c4 is 2346021463111956 and c4m is expr(2346021463111956*3) -silent
c4 is 2346021463111956 and c4m is 7038064389335868
and, script that doesn't work:
Code:
c4 is 2346021463111956 and am is 3
c4 is 2346021463111956 and c4m is expr(2346021463111956*3) -silent
c4 is 2346021463111956 and c4m is no variable indicator (@): interpreting batchfile lines as input expressions
eof; done processing batchfile
Code in both scripts:
Code:
am=3
      echo "c4 is $c4 and am is $am"
      c4m=$(echo "expr($c4*$am)" -silent)
      echo "c4 is $c4 and c4m is $c4m"
      c4m=$(../../yafu/yafu "expr($c4*$am)" -silent)
      echo "c4 is $c4 and c4m is $c4m"
I've also tried this with both YAFU 1 and YAFU 2 with identical results.

I fully agree with your assessment. That's why I didn't consider it a YAFU issue. But, I can't figure out what's wrong with the calling script. I'm thinking of using a separate script file to work around this, instead of embedding it in the main script.

Thanks!
EdH is offline   Reply With Quote