As far as I know, bash not related to using dashes. This is simply the convention of many UNIX command-line utilities to accept - as a placeholder for stdin or stdout , if instead of the name of the input or output of the file on the command line.
Edit : found that this behavior is specified in the
POSIX Utility Syntax Guide, §12.2.13 Open Group Base Group Specifications:
For utilities that use operands to represent files that need to be opened for reading or writing, the operand '-' should only be used to indicate standard input (or standard output when it is clear from the context that the output file is specified).
Matteo italia
source share