int n;
if ((n = read(fd1, buffer, 1000)) > 0) {
write(1, buffer, n);
}