
linux bash
rdstwww
IT民工
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Shell脚本执行时出现declare: not found的解决方法
错误现象: deployer@andy-VirtualBox:~/pds/EB$ sh build.sh build.sh: 18: build.sh: declare: not found build.sh: 25: build.sh: declare: not found build.sh: 32: build.sh: declare: not found 原因分析转载 2015-05-10 00:26:44 · 2572 阅读 · 0 评论 -
shell 学习之while语句
shell中4大循环语句: for、while、until、select 这里我们来学习下while的基本用法 一、while语法结构 while argument;do statement ....... done 二、常见用法 1、无限循环 while中无限循环使用 ((1)) 或者[1] while (());do转载 2015-05-10 01:18:45 · 755 阅读 · 0 评论 -
关于Bash中数组的使用
关于Bash中的数组,很多文章都已经介绍过。这里我也简单的写一下: 一、基础 Bash只是提供了一维数组,但没有上限的限制。 1)声明 # declare -a name 这样就声明了一个name数组。 2)赋值 给数组的赋值可以参考普通变量的定义,如: # name[0]=BeiJing # name[1]=GuangZhou # name[2转载 2015-05-10 01:21:56 · 516 阅读 · 0 评论