zoukankan      html  css  js  c++  java
  • shellSyntax.md

    shell
    #! /bin/bash 头文件
    echo -e 若字符串出现特殊字符,则特别处理
         -n 不要在最后自动换行
        ./filename.sh sh filename.sh
    read -p  输入   read 变量1  变量2
         提示语
    整数运算方法
        $(())  $[]
        declare -i
        expr
        let a=b+c
        test -e file #[-e file]  && echo"yes" || "no"
    字符串判断
        -z 字符串  判断字符串是否为空
        test -f                -d         -r        -w         -x
            是否为普通文件     是否为目录    是否可读   是否可写    是否可操作
    if [ 条件表达式 ]; then
    if [ 条件 ]; then
    elif[ 条件 ];then
    else
    fi
     
    case $变量名   in  “第一个变量内容” )
        echo""
        ;;
    $1 $2 传递参数的位置
    $0 当前路径
    while [ condition ]
    do
        程序段落
    done
     
    until []
    do
        程序段落
    done
     
    for((初始值;限制值;执行步长))
    do
        程序段落
    done
    Autor:VincentAdamNemessis E-mail:vincent5519@yeah.net QQ:3377299629 Wechat:ZTXLoveC3344
  • 相关阅读:
    1_Flask开启debug
    29_使用celery发送短信
    00_celery介绍(处理耗时任务)
    28_django限制请求方法装饰器
    27_扩展User模型
    05-3_单链表的实现
    05-2_单向链表
    05-1_链表的定义
    04-2_Python中的线性表
    04-1_线性表的操作
  • 原文地址:https://www.cnblogs.com/VincentAdam/p/14263461.html
Copyright © 2011-2022 走看看