date and time created 90/04/24 19:56:56 by william
[unix-history] / usr / src / sys / i386 / stand / cat.c
CommitLineData
992b95b0
WN
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * %sccs.include.noredist.c%
9 */
10
11#ifndef lint
12char copyright[] =
13"@(#) Copyright (c) 1990 The Regents of the University of California.\n\
14 All rights reserved.\n";
15#endif /* not lint */
16
17#ifndef lint
18static char sccsid[] = "@(#)cat.c 7.1 (Berkeley) %G%";
19#endif /* not lint */
20
21main()
22{
23 int c, i;
24 char buf[50];
25
26 do {
27 printf("File: ");
28 gets(buf);
29 i = open(buf, 0);
30 } while (i <= 0);
31
32 while ((c = getc(i)) > 0)
33 putchar(c);
34 exit(0);
35}