1 /* vi: set sw=4 ts=4: */
3 * cat implementation for busybox
5 * Copyright (C) 2003 Manuel Novoa III <mjn3@codepoet.org>
7 * Licensed under GPLv2 or later, see file License in this tarball for details.
10 /* BB_AUDIT SUSv3 compliant */
11 /* http://www.opengroup.org/onlinepubs/007904975/utilities/cat.html */
16 int cat_main(int argc, char **argv)
19 int retval = EXIT_SUCCESS;
21 getopt32(argc, argv, "u");
29 if ((f = bb_wfopen_input(*argv)) != NULL) {
30 int r = bb_copyfd_eof(fileno(f), STDOUT_FILENO);
31 bb_fclose_nonstdin(f);
36 retval = EXIT_FAILURE;