shell變量常用方法
變量之數組操作:
參考網址:http://www.jb51.net/article/55253.htm
#直接賦值 [[email protected]-yum yum.repos.d]# name[0]=chengd [[email protected]-yum yum.repos.d]# name[1]=xrd [[email protected]-yum yum.repos.d]# name[2]=cxx #小括號賦值 [[email protected]-yum yum.repos.d]# age=(20 19 18) #遍歷數組變量 [[email protected]