3 Prints files specified on command line to the console. */
9 main (int argc, char *argv[])
14 for (i = 1; i < argc; i++)
16 int fd = open (argv[i]);
19 printf ("%s: open failed\n", argv[i]);
26 int bytes_read = read (fd, buffer, sizeof buffer);
29 write (STDOUT_FILENO, buffer, bytes_read);
33 return success ? EXIT_SUCCESS : EXIT_FAILURE;