1
0
mirror of git://git.suckless.org/sbase synced 2024-12-27 17:42:29 +00:00
sbase/yes.c
sin a8ef54bae1 Simplify yes(1)
Just pick the first argument if multiple are provided.
2013-10-05 15:11:16 +01:00

26 lines
377 B
C

/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <stdlib.h>
#include "util.h"
static void usage(void);
int
main(int argc, char *argv[])
{
ARGBEGIN {
default:
usage();
} ARGEND;
for (;;)
puts(argc >= 1 ? argv[0] : "y");
return EXIT_FAILURE; /* should not reach */
}
void
usage(void)
{
eprintf("usage: %s [string]\n", argv0);
}