Search code examples
lua

What does "$" symbol mean in Lua?


I wonder how the dollar symbol $ is used in Lua.

Is it reserved for anything?

If so, I would appreciate an example of it.


Solution

  • It is not a part of the language. Instead, it's used to denote that "anything after this dollar sign should be executed in a shell."

    E.g., you might see:

    $ python  
    $ from pywinauto.application import Application
    

    So you would instead type:

    from pywinauto.application import Application
    

    Typically, it's used to indicate what you provide to your shell's prompt and what the output is.