From da69044a4654d86bada80eb1c09b6bf85f34f6a5 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 10 Oct 2021 15:45:09 +0000 Subject: init/shell: implement the echo command --- src/init/shell.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/init/shell.c b/src/init/shell.c index 12382e0..a43bd20 100644 --- a/src/init/shell.c +++ b/src/init/shell.c @@ -53,6 +53,10 @@ void shell_loop(void) { printf(PROMPT); readline(cmd, 256); args = split(cmd); - printf(" %s | %s\n", cmd, args); + if (!strcmp(cmd, "echo")) { + printf("%s\n", args); + } else { + printf("unknown command :(\n"); + } } } -- cgit v1.2.3