First page Back Continue Last page Overview Graphics
Standard files, con't
Standard Error
- Similar to standard ouptut, but used for error messages. This way, if standard output is re-directed, the error message is still seen (or at least it goes somewhere else)
- Redirect with 2>; note difference in these commands:
- cat /no/file/here > file3.txt
- cat /no/file/here 2>/dev/null
- Print to standard error with >&2
- echo “An error has occurred! Blame jtate!” >&2
Other file descriptors
- There is a system for using other file descriptors above 2, for your own purposes. I have no clue how it works, but I needed to put something in this space.
Notes: