Quote:
Originally Posted by ericshliao
I have a problem of redirecting output under xepdmgr.
I want to print output of myapp to a file, not that of xepdmgr. But with this shell command:./xepdmgr :0 ./myapp 2>&1 > out.msg, I can only catch output of xepdmgr. Of course, I can create a FILE descriptor and fprintf all output to that file. I just want to know if I can do it with proper shell command. Thanx.
|
No, it's not doable with a shell command. You will have to set-up a intermediate script that does the dumping to a file and call that script with xepdmgr:
$ cat /dev/tty > myapp.sh
#!/bin/sh
exec ./myapp 2>&1 >out.msg
^D
$ chmod 755 myapp.sh
$ xepdmgr :0 ./myapp.sh
And you will have the output of your program in out.msg
But you have raised a valid point. I will include in the next version of xepdmgr support for a "-q" command-line flag to make it "quiet" (don't output messages to stdout/stderr).