From 51a74fb3bb4529c55f32fa624d61f2f9775f1a73 Mon Sep 17 00:00:00 2001 From: Conrad Pankoff Date: Sat, 1 Jun 2019 20:10:35 +1000 Subject: [PATCH] Userland: Add a /bin/yes program (fixes #110) --- Userland/yes.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Userland/yes.cpp diff --git a/Userland/yes.cpp b/Userland/yes.cpp new file mode 100644 index 0000000000..b9d3ed725b --- /dev/null +++ b/Userland/yes.cpp @@ -0,0 +1,15 @@ +#include + +int main(int argc, char** argv) +{ + if (argc > 1) { + for (;;) { + puts(argv[1]); + } + } else { + for (;;) { + puts("yes"); + } + } + return 0; +}