What is the Linux equivalent of con?
For example, in DOS, if a program requires a file as input, you can use "con" as the filename, and it will read data from the keyboard.
What is the Linux equivalent of con?
For example, in DOS, if a program requires a file as input, you can use "con" as the filename, and it will read data from the keyboard.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
It all depends on what you want. "/dev/tty" should get you the user terminal, though this is not always the Linux console -- it may be an X-Term. If you're trying for the system console, I believe that "/dev/console" is what you need. You may not have access as a user to the system console, however.
Usually, when passing arguments to a program, you can usually specify - (a dash) as the filename. This has to be implemented by the program, though.
If you're writing a program, use stdin, but that's standard C.
SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
I say what I say, I mean what I mean.
IDE: emacs + make + gcc and proud of it.
Okay, thanks. I'll have to implement the - filename.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.