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
    
    
  • 相关阅读:
    问题账户需求分析
    需求分析初学理解
    GitHub初步探索-1-使用本地代码管理工具,简化上传的过程
    软件工程概论-个人总结
    第二次冲刺-个人工作总结05
    第二次冲刺-个人工作总结04
    第二次冲刺-个人工作总结03
    第二次冲刺-个人工作总结02
    第二次冲刺-个人工作总结01
    第一次冲刺-个人工作总结10
  • 原文地址:https://www.cnblogs.com/chenjo/p/15073801.html
Copyright © 2011-2022 走看看