Public Domain version of: yes(1)
Jonathan A. Chandross
jac at eagles.rutgers.edu
Sat Apr 2 12:15:56 AEST 1988
Enclosed is a public domain version of Berkeley's yes(1) program. I find
it to be invaluable.
This project started when I discovered that my friends who used System V,
Version 7, and Minix did not have this program. So I sat down and over
the next 4 months managed to write this version of yes(1). Since this
code does not contain any AT&T or Berkely code it can be freely distributed.
I hereby place this code in the public domain.
I would like to point out that this code is about twice as fast as the
Berkeley version. Placing argv[1] in a buffer and using puts() should
speed it up even further.
If anyone is interested in writing a man page, let me know and I'll be glad
to help.
Jonathan A. Chandross
ARPA: jac at paul.rutgers.edu
UUCP: rutgers!jac at paul.rutgers.edu
---------
Cut here
---------
/* */
/* yes(1) */
/* */
/* yes repeatedly outputs "y" or an optionial argument. */
/* */
/* Author: Jonathan A. Chandross January 17 - April 1, 1988 */
/* */
main(argc, argv)
int argc;
char **argv;
{
if(argc > 1)
for (;;)
printf("%s\n", argv[1]);
else
for (;;)
printf("y\n");
}
More information about the Alt.sources
mailing list