Occasionally I need to specify a "path-equivalent" of one of the standard IO streams (
stderr). Since 99% of the time I work with Linux, I just prepend
/dev/ to get
/dev/stdin, etc., and this "seems to do the right thing". But, for one thing, I've always been uneasy about such a rationale (because, of course, "it seems to work" until it doesn't). Furthermore, I have no good sense for how portable this maneuver is.
So I have a few questions:
In the context of Linux, is it safe (yes/no) to equate
More generally, is this equivalence "adequately portable"?
(I cringed as I wrote the last question, because I wish I could make it less subjective...)
I tried Googling these questions, including terms like POSIX among my search terms, but none of the top hits I got were particularly germane or authoritative.