![]() |
| | #1 |
| Frequently Quite Prolix Join Date: Apr 2005 Location: Canada
Posts: 7,629
| 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, etc. New project: nort |
| dwks is offline | |
| | #2 |
| Sr. Software Engineer Join Date: Sep 2005 Location: West Virginia
Posts: 235
| 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. |
| filker0 is offline | |
| | #3 |
| Me Join Date: Oct 2002 Location: Europe
Posts: 448
| 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. |
| -=SoKrA=- is offline | |
| | #4 |
| Frequently Quite Prolix Join Date: Apr 2005 Location: Canada
Posts: 7,629
| 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, etc. New project: nort |
| dwks is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Equivalent to volume serial number in linux | Elkvis | Linux Programming | 8 | 06-30-2009 08:46 PM |
| ReadProcessMemory/WriteProcessMemory Linux equivalent? | MrLucky | C++ Programming | 7 | 07-27-2007 09:36 AM |
| Linux equivalent to Win32 ShellExecute | BobS0327 | Linux Programming | 4 | 06-07-2006 04:35 AM |
| Linux equivalent to CreateDirectory | Rak'kar | Linux Programming | 2 | 07-10-2004 12:04 PM |
| .bat equivalent for linux | ichijoji | Linux Programming | 8 | 03-07-2004 08:06 AM |