12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #include "libbb.h"
- int yes_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int yes_main(int argc UNUSED_PARAM, char **argv)
- {
- char **pp;
- argv[0] = (char*)"y";
- if (argv[1])
- ++argv;
- do {
- pp = argv;
- while (1) {
- fputs(*pp, stdout);
- if (!*++pp)
- break;
- putchar(' ');
- }
- } while (putchar('\n') != EOF);
- bb_perror_nomsg_and_die();
- }
|