I tried this command to print the buffer of an existing screen session to stdout but I don't know why it doesn't print anything.

screen -x lftp -X hardcopy /dev/fd/1
screen -x lftp -X hardcopy /dev/stdout

It works if I use a regular file instead, so why doesn't it print to stdout when I use /dev/fd/1? I do this with other applications don't have an option to write to stdout and it works, so what does GNU/Screen do that makes it not work?

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

It probably doesn't work in this case because the command is sent to the pre-existing screen process, whose stdout is not the same as the stdout of the temporary screen process that you run to connect to the pre-existing screen process. (Disclaimer: this is a guess!)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.