diff options
author | dzwdz | 2021-10-10 15:45:09 +0000 |
---|---|---|
committer | dzwdz | 2021-10-10 15:45:09 +0000 |
commit | da69044a4654d86bada80eb1c09b6bf85f34f6a5 (patch) | |
tree | 60e952cd38f67d91032bfa2c111661b70b466fba /src | |
parent | e5077ed02c7e617583fe381db77de6e0faac1af6 (diff) |
init/shell: implement the echo command
Diffstat (limited to 'src')
-rw-r--r-- | src/init/shell.c | 6 |
1 files changed, 5 insertions, 1 deletions
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"); + } } } |