if((i%2==1)); then
    patern="Update"
else
    patern="Read"
fi
case $1 in
"-h")
    if [ $# -lt 2 ]
        then
            helpInfo
    else
        errorUse $@
    fi
    ;;
"-d")
    if [ $# -lt 2 ]
        then
            noDirectory
    elif [ $# -gt 2 ]
        then
            errorUse $@
    else
        DIR=$2
    fi
    ;;
*)
    errorUse $@
    ;;
esac

 

for i in `seq 10`
do
...
done
------------------->$ seq 2
1
2
------------------->$ seq 1 3
1
2
3
------------------->$ seq 1 2 5
1
3
5

 

------------------->$ for i in {1..3}; do echo "$i"; done
1
2
3

 

相关文章:

  • 2020-09-26
  • 2021-09-24
  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2021-12-12
猜你喜欢
  • 2021-07-01
  • 2021-05-02
  • 2022-12-23
  • 2021-07-02
  • 2021-10-09
  • 2022-12-23
相关资源
相似解决方案