summaryrefslogtreecommitdiff
path: root/userland/minibox/utilities/yes.c
blob: c0c43c891348c09e13a8efac883a9085784544fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "include.h"
#include <stdio.h>

int yes_main(int argc, char **argv) {
  if (argc < 2) {
    for (;;) {
      puts("y");
    }
  }

  for (;; putchar('\n')) {
    for (int i = 1; i < argc; i++) {
      printf("%s ", argv[i]);
    }
  }
  return 0;
}