Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <unistd.h>
- int main(int c, char *v[])
- {
- while (c == 1 && read(0, *v, 1) && write(1, *v, 1));
- while (c != 1 && *(++v) && (((*v)[0] == 45 && !(*v)[1] && !(c = 0)) ||
- ((c = open(*v, O_RDONLY))) != -1))
- while ((read(c, *v, 1) && write(1, *v, 1)) || (c && close(c) && 0));
- return (0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement