As this application never returns (closes) I can't seem to get it to redirect it's output to a file
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.
As this application never returns (closes) I can't seem to get it to redirect it's output to a file
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.
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
Originally Posted by Salem
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?
> 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?