请问在shell下,如何将字符串转化成数字? 有现成的函数可以调用吗?谢谢

请问在shell下,如何将字符串转化成数字? 有现成的函数可以调用吗?谢谢

请问在shell下,如何将字符串转化成数字? 有现成的函数可以调用吗?谢谢      
说具体些, 给个例子也好      
例如: 当我用awk读取了某条语句的行号, 此时这行号是字符串的形式: 比方说是112, 我要对它进行运算, 112 + 8 , 就必须将112其转化成数字的形式.      
expr 3 + 3
6
expr 8 * 8
expr:syntax error

:w 为什么有错      
You are right. "expr" can be used to do this. However, my problem is not completely solved. In fact , the question is that:
First, I use
    grep -ic ' total -force' filname | awk -F : '{print $1}' > linenumber  
    read N < linenumber[/COLOR]
so I can get the line number of the sentence I need.
   
     then I want to use "sed " command to print the line from N+1 to N+100.
    But I only know the format like :
sed -n '100, 103p' OUTCAR.4 [/COLOR]
     I don't know how to substitude 100 by the linenumber I get.      
[QUOTE]最初由 blackspace 发布
[B]expr 3 + 3
6
expr 8 * 8
expr:syntax error

:w 为什么有错 [/B][/QUOTE]
这样用:
$ expr 8 \* 8      
to fangxiya:
把你的问题抽象一下, 别动不动就写一大段话, 而且还是 english, 看不懂