diff --git a/chp3_process/osh_shell/osh.c b/chp3_process/osh_shell/osh.c index 21dbe84..7885d7e 100644 --- a/chp3_process/osh_shell/osh.c +++ b/chp3_process/osh_shell/osh.c @@ -46,13 +46,13 @@ int main(void) { if (nth_command(raw, history_count) != -1) { printf("%s\n", raw); } else { - printf("History is empty\n"); + fprintf(stderr, "History is empty\n"); continue; } } else if ((c = strchr(raw, '!')) != NULL) { const int n = digits(c); if (nth_command(raw, n) != -1) { - printf("%s\n", raw); + fprintf(stderr, "%s\n", raw); } else { printf("Command not found in position %d\n", n); continue;