bore

Unnamed repository
Log | Files | Refs

commit 660e87bbb6963521534f817f1f2c88c549772489
parent 46afedf20555edcb8551eff4ab2159eb38585edb
Author: aabacchus <ben@bvnf.space>
Date:   Thu, 16 Sep 2021 20:38:30 +0100

echo: add

Diffstat:
MMakefile | 2+-
Aecho.c | 13+++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -1,6 +1,6 @@ .POSIX: -BINS = cat +BINS = cat echo XCFLAGS = $(CFLAGS) -Wall -Wextra -Wpedantic -g .PHONY: clean diff --git a/echo.c b/echo.c @@ -0,0 +1,13 @@ +#include <stdio.h> + +int +main(int argc, char **argv) { + argv++; + while (*argv) { + printf("%s", *argv); + if (*++argv) + printf(" "); + } + printf("\n"); + return 0; +}