Userland: Add a simple /bin/echo program.

This commit is contained in:
Andreas Kling 2019-04-25 04:42:09 +02:00
parent 737315c228
commit eadcf720c0
Notes: sideshowbarker 2024-07-19 14:35:51 +09:00

12
Userland/echo.cpp Normal file
View file

@ -0,0 +1,12 @@
#include <stdio.h>
int main(int argc, char** argv)
{
for (int i = 1; i < argc; ++i) {
fputs(argv[i], stdout);
if (i != argc - 1)
fputc(' ', stdout);
}
printf("\n");
return 0;
}