io - In Lua, how to print the console output into a file (piping) instead of using the standard output? -


i workin' torch7 , lua programming languages. need command redirects output of console file, instead of printing shell. example, in linux, when type:

$ ls > dir.txt

the system print output of command "ls" file dir.txt, instead of printing default output console. need similar command lua. know it?

[edit] user suggests me operation called piping. so, question should be: "how make piping in lua?"

[edit2] use # command do:

$ torch 'my_program' # printed_output.txt

have here -> http://www.lua.org/pil/21.1.html

io.write seems looking for.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -