diff options
| -rwxr-xr-x | challenge-028/stuart-little/lua/ch-1.lua | 5 | ||||
| -rwxr-xr-x | challenge-028/stuart-little/lua/ch-2.lua | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/challenge-028/stuart-little/lua/ch-1.lua b/challenge-028/stuart-little/lua/ch-1.lua new file mode 100755 index 0000000000..1bded6c1e5 --- /dev/null +++ b/challenge-028/stuart-little/lua/ch-1.lua @@ -0,0 +1,5 @@ +#!/usr/bin/env lua + +-- run <script> <path> + +print(io.popen("file -L "..arg[1]):read("a"):match("text") and "text file" or "not a text file") diff --git a/challenge-028/stuart-little/lua/ch-2.lua b/challenge-028/stuart-little/lua/ch-2.lua new file mode 100755 index 0000000000..4b311354f9 --- /dev/null +++ b/challenge-028/stuart-little/lua/ch-2.lua @@ -0,0 +1,10 @@ +#!/usr/bin/env lua + +-- run <script> + +while true do + os.execute("clear") + print(os.date():match("(%S*:%S*)")) + if not os.execute("sleep 1") then break end +end + |
