On Aug 14, 2011, at 2:49 AM, Artur Skonecki wrote: > On Sat, 13 Aug 2011, Aaron Davies wrote: >> third is that this screen interprets "hardcopy -h" as "write a hardcopy of >> the current screen (without scrollback) to a file named "-h" (relative to >> screen's pwd). i'm not entirely sure how to fix that one, > > If it is indeed the case, replacing hardcopydir with chdir command > should suffice.
i'll give that a try >> as i'm not sure how to get the number of windows in a screen back out to the >> script. (otherwise the brute-force way would be to iterate over them, >> generating the name variations myself.) > > Are you trying to get the total number of windows in a session? > You could consider counting the number of hardcopy files as an > unreliable solution (Screen may be late with some of the files). i was thinking of something like for w in $(get window count here); do screen -S "$session" -X eval "hardcopydir '$HARDCOPYDIR/$session'" "at "#$w" hardcopy -h hardcopy.$w done -- Aaron Davies aaron.dav...@gmail.com _______________________________________________ screen-users mailing list screen-users@gnu.org https://lists.gnu.org/mailman/listinfo/screen-users