commit 93016659c65a11390142bed52b3a1c7bb9e1350a parent 0e055dbfe12551d11b63e1d32a85d72c9b1bdcc6 Author: call-cc <callcc@vxempire.xyz> Date: Mon, 1 Jun 2020 15:37:33 -0400 Add echo Diffstat:
A | src/echo.c | | | 14 | ++++++++++++++ |
1 file changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/echo.c b/src/echo.c @@ -0,0 +1,14 @@ +#include <string.h> +#include <stdio.h> +#include <unistd.h> + +int +main(int argc, char *argv[]) +{ + while(*argv) { + (void)fputs(*argv, stdout); // Print argv + if(*++argv) putchar(' '); // If multiple things in argv, print a space between them. + } + putchar('\n'); + return 0; +}