Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for min_php.bat

(view source code of min_php.bat as plain text)

  1. :: https://www.robvanderwoude.com/batchphp.php
  2. :: Returns the smallest of the numbers specified
  3. :: Usage:  "Min 4 16 0 -9" returns "-9"
  4. @ECHO OFF
  5. SETLOCAL ENABLEDELAYEDEXPANSION
  6. IF NOT "%~2"=="" (
  7. 	FOR %%A IN (%*) DO SET Args=!Args!, %%A
  8. 	PHP -r "print(min(!Args:~2!));"
  9. )
  10. ENDLOCAL
  11.  

page last modified: 2024-04-16; loaded in 0.0050 seconds