#include #include #include #include #include #include static char *str1 = "OP1\n"; static char *str2 = "AB2\n"; int main() { int f1, f2; f1 = open ("mytmp", O_RDWR | O_CREAT | O_TRUNC, 0777); f2 = dup(f1); write(f1, str1, strlen(str1)); write(f2, str2, strlen(str2)); return 0; }