From e1f27a2acdea471fb94b241569bdf49064ce632e Mon Sep 17 00:00:00 2001 From: devomaa Date: Mon, 29 Jun 2020 17:28:13 +0300 Subject: [PATCH] Duplicate "stdin" --- shellex/cat.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shellex/cat.lua b/shellex/cat.lua index 4eefa3b..0010d49 100644 --- a/shellex/cat.lua +++ b/shellex/cat.lua @@ -4,7 +4,10 @@ local fs = require("shellex.filesystem") local args = shell.parse(...) local ec = 0 if #args == 0 then - args = {"-"} + while true do + local input = read() + print(input) + end end for i = 1, #args do @@ -28,4 +31,4 @@ for i = 1, #args do end end -return ec \ No newline at end of file +return ec -- 2.49.1