lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

>From: Dan Marks <>

>why not use # as a comment character like many other scripting languages.
>That way lua could also be used by putting #!/usr/local/bin/lua
>at the top of a script, and it could be used like a shell.

You can do scripts already. Lua skips the first line if it starts with #.

In the next version, the stand alone interpreter will have a '-f' option will
make it even easier to use Lua scripts. From the (new) man page:

       -f file
              collect all remaining arguments as strings  into  a
              global  table named arg and then execute file.  The
              arguments in arg start at 0, which contains `file'.
              The  index of the last argument is stored in arg.n.