aboutsummaryrefslogtreecommitdiff
path: root/challenge-028
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-028')
-rwxr-xr-xchallenge-028/stuart-little/lua/ch-1.lua5
-rwxr-xr-xchallenge-028/stuart-little/lua/ch-2.lua10
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
+