0

I have this:

normal=$(find dl -type f | wc -l)
reverse=$(find dlR -type f | wc -l)

where both variables have numbers, but when I try to do something like this:

printf "$normal"+"$reverse"

I dont get the values summed up. What mus I do to add both variables?

dominique120
  • 991
  • 4
  • 18
  • 28

2 Answers2

1
 printf "$((normal + reverse))\n"; 
Jayesh Bhoi
  • 22,676
  • 14
  • 57
  • 72
1

Try with

printf `expr $num1 + $num2`
evading
  • 2,928
  • 3
  • 36
  • 51