![]() |
| | #1 |
| Registered User Join Date: Jan 2006
Posts: 62
| Redirecting stdout from XEV xev > /tmp/file.txt does not work...try it. It will create the file, but with no text inside. Any other idea's much appreciated. |
| 3saul is offline | |
| | #2 |
| and the hat of Jobseeking Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,665
| Works for me Code: $ xev > tmp.txt X connection to :0.0 broken (explicit kill or server shutdown). $ ls -l tmp.txt -rw-rw-r-- 1 ??? ??? 18125 Feb 25 11:10 tmp.txt |
| Salem is offline | |
| | #3 | |
| Registered User Join Date: Jan 2006
Posts: 62
| Quote:
OK yes it's working for me too now. The reason I thought it wasn't working was because it took so long before it would write the data to the text file. Is there anyway to force it to write immediately to the piped file? | |
| 3saul is offline | |
| | #4 |
| and the hat of Jobseeking Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,665
| > Is there anyway to force it to write immediately to the piped file? If you use fork()/exec()/dup()/open() etc to manually create the process and the pipe, you should be able to make the pipe unbuffered. But are you attempting to read that file with another process at the same time? |
| Salem is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| redirecting stdout | ichijoji | C++ Programming | 2 | 08-15-2006 09:20 PM |
| Problems with switch() | duvernais28 | C Programming | 13 | 01-28-2005 10:42 AM |
| redirecting stdout | gregulator | C Programming | 2 | 04-22-2004 10:07 AM |
| redirecting stdout to a socket | Kinasz | Linux Programming | 2 | 03-25-2004 08:01 AM |
| redirecting stdout | Draco | C Programming | 13 | 10-11-2003 12:56 AM |