view toys/yes.c @ 169:56034b162074

Implement dmesg.
author Rob Landley <rob@landley.net>
date Tue, 20 Nov 2007 01:06:29 -0600
parents bb6048c923ec
children 25447caf1b4b
line wrap: on
line source

/* vi: set sw=4 ts=4: */
/*
 * yes.c - Repeatedly output a string.
 */

#include "toys.h"

int yes_main(void)
{
	for (;;) {
		int i;
		for (i=0; toys.optargs[i]; i++) {
			if (i) xputc(' ');
			xprintf("%s", toys.optargs[i]);
		}
		if (!i) xputc('y');
		xputc('\n');
	}

	return 0;
}