Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
- can be a place holder for stdout in contexts that expect a file that is written to (like tar cf -), or stdin in contexts that expect a file that is read from (like paste -, diff - file) or several other things. For instance for cd, - means the previous directory. - is also use as the option delimiter for most Bourne-like shells and builtins of the Bourne/Korn/Z shells. See also patch -r - where - means discard
@Kusalananda It's for a CLI argument for a program of mine. I want to allow the user to configure where certain log messages go. A - filename directs certain messages to stdout. I want something similar for stderr.
-can be a place holder for stdout in contexts that expect a file that is written to (liketar cf -), or stdin in contexts that expect a file that is read from (likepaste -,diff - file) or several other things. For instance forcd,-means the previous directory.-is also use as the option delimiter for most Bourne-like shells and builtins of the Bourne/Korn/Z shells. See alsopatch -r -where-means discard-could be useful for representing the standard error stream?-filename directs certain messages to stdout. I want something similar for stderr.