Thnaks for hints! One odd thing I noticed about the -L option, that is that first character doesn't seem to logged. Try
$ screen -L -d -m echo 123 $ cat screelog.0 23 Bug? Cheers, Nico On Fri, Feb 11, 2011 at 7:33 PM, Andrew McGlashan <andrew.mcglas...@affinityvision.com.au> wrote: > Hi, > > Nico Schlömer wrote: >> >> I would like to start a series of jobs in the background and log their >> stdout in specific files. The idea is to use screen for this, and I >> went ahead and typed >> >> $ screen -d -m /path/to/my/exec >> >> which puts the job nicely in the background. Let's log stdout: >> >> $ screen -d -m /path/to/my/exec | tee output.log > > What's wrong with using the -L option? > > As a test, I created the following alias and ran it fine. > > # alias ns9='if [ -f screenlog.0 ];then rm screenlog.0;fi && > (/usr/bin/screen -S root -L -d -m time /usr/local/bin/program.sh; tail -99f > screenlog.0) && mv screenlog.0 my-test-screenlog.out' > > > # ns9 > > That seems to work nicely! > > And I know it's finished when I see the "time" output. > > If you want to run multiple sessions, then you might need to create a > working directory for each one and start the command in each directory so > that it will always have it's own screenlog.0 file. > > > Cheers > > -- > Kind Regards > AndrewM > > Andrew McGlashan > Broadband Solutions now including VoIP > > _______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users