View Single Post
Old 10-23-2008, 03:22 AM   #41
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by ericshliao View Post
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).
Antartica is offline   Reply With Quote