yes.c (384B)
1 /* This is a terrible implementation of the core utility 'yes' */ 2 /* For license information see the LICENSE file included in the repository */ 3 #include<stdio.h> 4 5 int main(int argc, char *argv[]) 6 { 7 if(argc == 2) { 8 while ( 1 == 1) { 9 printf("%s\n", argv[1]); 10 } 11 return 0; 12 } 13 while ( 1 == 1) { 14 printf("yes\n"); 15 } 16 return 0; 17 }