1.11M Members

adding 1 to a variable

 
0
 

The following line of code should result in GROUPS holding a number from 1 to probably 4 or 5. I need the next line to simply add 1 to whatever this lines results to. I've tried a lot of tings in bash but I can't make it happen. Any ideas? Thanks. GROUPS=$( expr ${NUMBEROFDIGITS} / 3 )

I thought it would be as simple as ${GROUPS}=${GROUPS+1} or }+1 but nothing I've tried has worked.

 
0
 

Try GROUPS=$(($GROUPS + 1))
I'm not near a terminal so the syntax may be slightly different

Question Answered as of 1 Year Ago by L7Sqr
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article