Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for max_php.bat

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

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

page last uploaded: 2017-07-06, 12:37