2.9BSD/usr/src/sys/stand/util/cat.c

Compare this file to the similar file:
Show the results in this format:

char module[] = "cat";		/* module name -- used by trap */
main()
{
	int c, i;
	char buf[50];

	printf("%s\n",module);
	do {
		printf("File: ");
		gets(buf);
		i = open(buf, 0);
	} while (i <= 0);

	while ((c = getc(i)) > 0)
		putchar(c);
	exit(0);
}