原帖由 chilewh 于 2009-3-3 15:18 发表
实际上是这样的,配置文件/root/test/s.conf
# TAG: bandwidth
bandwidth 600
#获取bandwidth的值
v_bw=$(sed -n '/^bandwidth/s/bandwidth //p' /root/test/s.conf)
#为tc流量控制的命令,建立t ...
原帖由 chilewh 于 2009-3-3 16:53 发表
产生了一个问题
配置文件/root/test/s.conf
# TAG: bandwidth
bandwidth 600
#获取bandwidth的值
v_bw=$(sed -n '/^bandwidth/s/bandwidth //p' /root/test/s.conf)
(( v_bw=$ v_bw+ 1 ))
echo $ ...
原帖由 chilewh 于 2009-3-3 17:10 发表
[root@localhost ~]# declare -i v_bw=$(sed -n '/^bandwidth/s/bandwidth //p' /root/test/s.conf)
提示:
")syntax error: operand expected (error token is "
请问这个declare -i v_bw=$(sed ....)是什 ...
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |