Shell编程
2017-03-10 本文已影响0人
lupinwu
更改显示颜色
echo -e "\e[1;30m Jeson say Hi~ \e[1;0m"
echo -e "\e[1;30m" "Jeson say Hi~" $(tput sgr0)
$(tput sgr0)初始化终端
关联数组
-
区别
普通数组:只能使用整数作为数组索引
关联数组:可以使用字符串作为数组索引 -
申明
declare -A ass_array1
- 赋值
数组名[索引]=变量值
ass_array1[index1]=pear