夫为剑者

示之以虚 开之以利 后之以发 先之以至

常用链接

统计

积分与排名

最新评论

shell 脚本--------控制语句

shell 脚本

控制语句

1.if
  if condition
     statements
  then
     statements
  elif
     statements
  fi

2.for
  for variable in values
  do
     statements
  done

3.while
  while conditoin
  do
     statements
  done

4.until
  until condition
  do
     statements
  done

5.case
  case variable in
  pattern | pattern | pattern……) statements
  pattern | pattern | pattern……) statements
  ……
  esac

6.and
  statements && statements && statements ……
  从左开始执行命令,如果执行结果为true则继续执行,为false则返回

7.or
  statements || statements || statements ……
  从左开始执行命令,如果执行结果为false则继续执行,为true则返回

posted on 2006-02-17 10:09 vivip 阅读(168) 评论(0)  编辑 收藏 引用 所属分类: 学习笔记


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理