Does “ - ” mean stdout in bash?

后端 未结 4 1681
迷失自我
迷失自我 2020-12-10 04:25

Is \" - \" a shortcut for stdout in bash? If not what does it mean? For example,

wget -q -O - $line 

How about stdin?

Thanks and re

4条回答
  •  生来不讨喜
    2020-12-10 05:01

    - is not special in bash, it is simply given as a parameter to the program. Then it depends on the program how it interprets that -.

    Commonly it denotes that stdin or stdout should be used, depending on context.

提交回复
热议问题