shell---变量自增

我所知道的,bash中,目前有五种方法:
1. i=`expr $i + 1`;
2. let i+=1;
3. (( i++ ));
4. i=$[ $i+1 ];
5. i=$(( $i + 1 ))

posted on 2016-12-23 14:19  萧飞IDO  阅读(196)  评论(0编辑  收藏  举报

导航