2. Command-Line Usage


smx -e expression : Evaluate expression as an SMX function
smx [-c] filename : Open file and parse, optionally add CGI headers [-c].


SMX can be an excellent embedded expression application for your software. Use it to add inline expression evaluation to your batch files, and process control, or to include within an application.

Command-line arguments can be retrieved with %arg(<integer>), the number of arguments is in %num-args%.


-- return the contents of the SMX language main web site

smx -e '%include(http://www.smxlang.org/)'

-- as a cgi, display all browser headers

#!/usr/bin/smx -c
%enumheader(%header% %value% %lf%)