repos/msh

simple shell implementation
Commits Files Refs README LICENSE
commit a0593f6dd310c51455a408161a563a1e18ac159f
parent ae3dc70f33d97240771704eb445c7938611c76e7
Author: Martin Kloeckner <mjkloeckner@gmail.com>
Date:   Sat,  7 Sep 2024 14:57:19 -0300

change `command not found` error message

Diffstat:
Mmsh.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/msh.c b/msh.c
@@ -250,7 +250,7 @@ void msh_execute(char **argv) {
     if (pid == 0) {
         /* child process */
         if(execvp(argv[0], argv) < 0)
-            perror(argv[0]);
+            fprintf(stderr, "%s: command not found\n", argv[0]);
 
         exit(EXIT_FAILURE);
     }