Linux if语句详解

时间:2014-01-18 05:52:32
【文件属性】:

文件名称:Linux if语句详解

文件大小:33KB

文件格式:DOC

更新时间:2014-01-18 05:52:32

Linux if

详细讲解了Linux中if语句的使用 脚本示例: #!/bin/bash # This script prints a message about your weight if you give it your # weight in kilos and hight in centimeters. if [ ! $# == 2 ]; then echo "Usage: $0 weight_in_kilos length_in_centimeters" exit fi weight="$1" height="$2" idealweight=$[$height - 110] if [ $weight -le $idealweight ] ; then echo "You should eat a bit more fat." else


网友评论

  • 非常详细,非常受用
  • 很全啊,很有用!!值得下载
  • 还行,比较有用
  • if 语句介绍的很全。