2
votes
4answers
557 views

Calculate variable, and output it to another variable

The only calculator I know is bc. I want to add 1 to a variable, and output to another variable. I got the nextnum variable from counting string in a file: nextnum=`grep -o stringtocount ...
4
votes
2answers
313 views

Does bc supports hex calculations?

I'm trying to do a hex calculation directly with bc, I already specified the scale. echo 'scale=16;c06b1000-c06a5e78' | bc But it still got me zero. What could be wrong?