码迷,mamicode.com
首页 > 其他好文 > 详细

杂记---待整理

时间:2017-01-06 21:57:00      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:com   关联数组   整理   恢复   数组名   index   高亮   consumer   ons   

---恢复内容开始---

shell高亮显示

echo -e 终端颜色 显示内容 结束后的颜色

 \e[1;31m content \e[1;0m

1为设置,0为不设置。

31m 0m为颜色

[ucm@MacBook-Pro testpace]$ echo -e "\e[1;31m consumer huawei com \e[1;0m"
 consumer huawei com 
[ucm@MacBook-Pro testpace]$ 

shell中的关联数组

关联数组

  普通数组:只能使用整数作为数组索引

  关联数组:可以使用字符串作为数组索引

申明关联数组变量

#declare -A ass_array1

赋值:数组名[索引]=变量值

#ass_array1[index1]=pear

 

 

 

 

 

 

 

 

 

 

 

 

---恢复内容结束---

杂记---待整理

标签:com   关联数组   整理   恢复   数组名   index   高亮   consumer   ons   

原文地址:http://www.cnblogs.com/jxdong116/p/6257031.html

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