- 论坛徽章:
- 0
|
- # expr 4737785 \* 1000
- 442817704
复制代码
我先试了除法,结果不对,我又反过来用*法,也不对嘛,后来发现expr
有上限啊。
以下为例
- expr 1234567890 \* 1000
- 1912276048
复制代码
查了man
expr takes arguments as an expression, evaluates, then writes the
result on the standard output. Terms in the expression must be
separated by blanks. Characters special to the shell must be escaped.
Note that 0, rather than the null string, is returned to indicate a
zero value. Strings containing blanks or other special characters
should be quoted. Integer-valued arguments can be preceded by a unary
minus sign. Internally, integers are treated as 32-bit, 2's
complement numbers.
原来只能是32位整数,用bc好象上限高点,至少满足我的要求了。
只好现在开始想想用办法怎么把这个Bytes化为KBytes了。 |
|