call python in a shell script
Problem
Floating point arithmetic in bash is problematic, expr supports integers only for instance.
Solution
Not an optimal solution but it works:
$ python -c "print 5.5*3" 16.5 $ num=`python -c "print 5.5*3"` $ echo $num 16.5
Comments (0)
Trackbacks (0)
Leave a comment
Trackback
