Reading Multiple Files with Bash
Aug 22, 2009, 20:04 (1 Talkback[s])
(Other stories by Mitch Frazier)
"Notice the input redirection to read uses another special form
that includes the ampersand (&) to specify that what follows is
a file descriptor and not a file name.
"Use file descriptors in the range 3-9. File descriptors below 3
are used for standard input, output, and error, the ones above 9
may be used by the shell internally.
"Although there is no explicit syntax for closing a file,
re-using the file descriptor will close the file before opening the
new file. To be safe you could do the following to close the
files:"
Complete
Story
Related Stories:
- Nano Text Editor Course(Aug 19, 2009)
- [e|c]tags With Emacs and Vim(Aug 18, 2009)
- More Debt Watching from the Command Line(Aug 13, 2009)
- 5 Simple Bash Tips, Part III(Aug 13, 2009)
- Bash Shell Course: Text Editors(Aug 12, 2009)
- Ten essential commands for Linux tasks(Aug 07, 2009)
- Screen : 10 Window Settings(Aug 07, 2009)
- Tech Tip: View Config Files Without Comments(Aug 06, 2009)
- Bash, in Color(Aug 03, 2009)