micro-utils/coreutils/echo.c
Your Name e1b6a32504 fix
2023-11-07 19:41:47 +03:00

17 lines
364 B
C

#include <stdio.h>
int main(const int argc, const char **argv) {
if (argc > 1) {
for (int i = 1; i < argc; i++) {
fputs(argv[i], stdout);
if (i < argc - 1)
putchar(' ');
}
}
/* https://pubs.opengroup.org/onlinepubs/009604599/utilities/echo.html */
/* This version does not support -n option and escape-sequences */
putchar('\n');
return 0;
}