linux bash shell之declare

时间:2015-08-04 19:04:13   收藏:0   阅读:223
一、
#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会被当作数组.

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!