zoukankan      html  css  js  c++  java
  • Windows Batch 编程 和 Powershell 编程

    Batch Script - Functions with Return Values

    https://www.tutorialspoint.com/batch_script/batch_script_functions_with_return_values.htm
    

    How can I check the size of a file in a Windows batch script?

    https://stackoverflow.com/questions/1199645/how-can-i-check-the-size-of-a-file-in-a-windows-batch-script/1199839
    ::If the file name is used as a parameter to the batch file, all you need is %~z1 (1 means first parameter)
    @echo off
    setlocal
    set file="test.cmd"
    set maxbytesize=1000
    
    FOR /F "usebackq" %%A IN ('%file%') DO set size=%%~zA
    
    if %size% LSS %maxbytesize% (
        echo.File is ^< %maxbytesize% bytes
    ) ELSE (
        echo.File is ^>= %maxbytesize% bytes
    )
    
    

    Equivalent of Unix find command on Windows

    https://superuser.com/questions/401495/equivalent-of-unix-find-command-on-windows
    

    Creating batch script to unzip a file without additional zip tools

    https://stackoverflow.com/questions/21704041/creating-batch-script-to-unzip-a-file-without-additional-zip-tools/51159081
    

    findstr exit codes/errorlevel

    https://stackoverflow.com/questions/31810950/findstr-exit-codes-errorlevel
    

    Equivalent to 'cut' on Windows

    https://stackoverflow.com/questions/25066360/equivalent-to-cut-on-windows
    

    Equivalent of (foo &>/dev/null &) in Windows Shell

    https://superuser.com/questions/777198/equivalent-of-foo-dev-null-in-windows-shell#:~:text=The%20%3E%20has%20the%20same%20meaning,will%20all%20go%20to%20NUL%20.
    start /B foo >NUL 2>&1
    
    # >/dev/null     ...   >NUL
    

    Agent 11.3.7, Windows Server 2016 and Powershell

    https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=777596
    
    
  • 相关阅读:
    js中的匿名函数
    js在函数中未定义的变量的处理
    js中的isNaN()函数
    js中boolean类型的理解
    instanceof关键字
    js
    toString 方法在数组中的使用
    java中public private protected default的区别
    韩信点兵(hanxin)
    阶乘之和 输入n,计算S=1!+2!+3!+…+n!的末6位(不含前导0)。n≤10 6 ,n!表示 前n个正整数之积。
  • 原文地址:https://www.cnblogs.com/chenjo/p/15073801.html
Copyright © 2011-2022 走看看