tags:

views:

67

answers:

6

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
A: 

What OS? What (coding) language are you trying to read it with?

Tom Bascom
A: 

cat <- will work under *nix.

Richard Pennington
A: 

No differently that from any other file.

Ariel
+1  A: 

Assuming you're using a utility that represents STDIN/STDOUT with -, try using ./- or -- -.

P-Nuts
A: 

Thank you all, I,ve solved It: $PWD/-

newaaanewaa