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
    
    
  • 相关阅读:
    tomcat日志信息查看
    "".equals(xxx)和xxx.equals("")的区别
    javax.crypto.BadPaddingException: Given final block not properly padded解决方案
    去掉first li 的list图标
    浮动后的 <li> 如何在 <ul> 中居中显示?
    java冒泡排序
    JSP获取网络IP地址
    <%@ include %>导入的文件乱码
    out.print()与response.sendRedirect()
    王爽汇编语言第三版第5章实验4
  • 原文地址:https://www.cnblogs.com/chenjo/p/15073801.html
Copyright © 2011-2022 走看看