Answer the question
In order to leave comments, you need to log in
What are the differences, what are their functions?
Looking at the programs, I noticed that in some files they use different functions, but in essence they are the same.
1. #!/home/test
2. dofile("/home/test")
3. os.execut("/home/test")
How are they different or did I mess something up?
Answer the question
In order to leave comments, you need to log in
The first is not a function, but a shebang .
The second one loads the specified argument and executes it as a Lua script (can be in text form or in the form of bytecode compiled into a format compatible with the current interpreter).
The third is the equivalent of the system() function in C/C++: it executes an arbitrary program using the OS.
// only you made a typo and there execut e .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question