Using File Descriptors - English

1308 visits



Outline:

Using File Descriptors Introduction on fd Assign the file descriptor (fd) to file for output(exec fd > filename) Explained using an example of 'date' and 'echo' Closing the output fd(exec fd<&-) Explaination on error for the statements defiened after closing fd Assign the file descriptor (fd) to file for input(exec fd < filename) Closing the input file descriptor(exec fd<&-) Explaination on input fd using 'cat'