码迷,mamicode.com
首页 > 系统相关 > 详细

linux bash shell之declare

时间:2015-08-04 19:05:46      阅读:150      评论:0      收藏:0      [点我收藏+]

标签:

一、
#Set the right GC options based on the what we are running
declare -a server_cmds=("master" "regionserver" "thrift" "thrift2" "rest" "avro" "zookeeper")
for cmd in ${server_cmds[@]}; do
        if [[ $cmd == $COMMAND ]]; then
                server=true
                break
        fi
done
解释======>
-a 数组
declare -a indices
变量indices会被当作数组.

linux bash shell之declare

标签:

原文地址:http://www.cnblogs.com/itcomputer/p/4702781.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!