From 93b92cf5c62294e0845368d1dcd37e90d70a197f Mon Sep 17 00:00:00 2001 From: Fabio Scotto di Santolo Date: Sun, 15 Sep 2024 21:06:10 +0200 Subject: [PATCH] Update osh.c --- chp3_process/osh_shell/osh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chp3_process/osh_shell/osh.c b/chp3_process/osh_shell/osh.c index 7885d7e..221b6a0 100644 --- a/chp3_process/osh_shell/osh.c +++ b/chp3_process/osh_shell/osh.c @@ -52,9 +52,9 @@ int main(void) { } else if ((c = strchr(raw, '!')) != NULL) { const int n = digits(c); if (nth_command(raw, n) != -1) { - fprintf(stderr, "%s\n", raw); + printf("%s\n", raw); } else { - printf("Command not found in position %d\n", n); + fprintf(stderr, "Command not found in position %d\n", n); continue; } }