0

How do I add a float and an integer in shell scripts?

For example, the following throws an error:

i=1; ((t=i+2.5)); echo "$t"; 
Angelos
  • 185
  • 2
  • 10

1 Answers1

0

echo 1.234 2.345 | awk '{print $1 + $2}'

Use awk

Duplicate question.