commit: 3cc3b049d5ac03c0e8a6b55618a4b7f4b1daf6bc
parent: 47ff1fa7f12de403eef65a8e7bb5dd890a6b5886
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sun, 26 Jan 2020 09:32:28 +0100
src/echo.c: New
Diffstat:
1 file changed, 19 insertions(+), 0 deletions(-)
diff --git a/src/echo.c b/src/echo.c
@@ -0,0 +1,19 @@
+// Copyright 2020 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
+// Distributed under the terms of the CC-BY-SA-4.0 license
+
+#include <stdio.h> /* printf(), putchar() */
+
+// Note: maybe consider buffering to write(2) only once like in Plan9
+// https://web.archive.org/web/20150519100236/https://gist.github.com/dchest/1091803#comment-1398629
+int
+main(int argc, char *argv[])
+{
+ int i;
+
+ for(i = 1; i <= argc; i++)
+ printf("%s ", argv[i]);
+
+ putchar('\n');
+
+ return 0;
+}