Hello, how to read content of a file which name is "-" (dash, not stdin)?
+4
A:
From any programming language, just open the file. A single dash is certainly no special file name and can be opened like any other one.
From a shell, you can use ./-
:
$ some_command --out foo --in ./-
Joey
2010-01-18 15:44:29
+1
A:
Assuming you're using a utility that represents STDIN/STDOUT with -
, try using ./-
or -- -
.
P-Nuts
2010-01-18 15:49:07