jqkyp 发表于 2018-8-27 11:57:38

if示例2_shell脚本

  工作环境:Red Hat Enterprise Linux Server>  #!/bin/bash
  #
  for i in `seq 9`
  do
  for j in `seq 9`
  do
  if [ $j -le $i ];then
  echo -n " $j * $i = $(($i*$j))   "
  else
  #            echo -e "\n"
  echo
  break;
  fi
  done
  done
  注意: echo -e "\n"
  echo
  的区别

页: [1]
查看完整版本: if示例2_shell脚本