SYSENTER/SYSCALL support
[minix.git] / commands / yes / yes.c
blobb05ad14af296f5f18a1c862ae3f522ce34678503
1 /* yes 1.4 - print 'y' or argv[1] continuously. Author: Kees J. Bot
2 * 15 Apr 1989
3 */
4 #include <sys/types.h>
5 #include <stdlib.h>
6 #include <string.h>
7 #include <unistd.h>
9 int main(int argc, char **argv)
11 char *yes;
12 static char y[] = "y";
13 int n;
15 yes= argc == 1 ? y : argv[1];
17 n= strlen(yes);
19 yes[n++]= '\n';
21 while (write(1, yes, n) != -1) {}
22 exit(1);