Re: screen, detached, stdout

Andrew McGlashan <andrew.mcglashan-eCNwZfdMfp8leAitJ8REmSkBLnlaf3ui@public.gmane.org>
Newsgroups gmane.comp.gnu.screen.user
Organization Affinity Vision Australia Pty Ltd
Message-ID <[email protected]>
Hi Nico,

Nico Schlömer wrote:
> 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?

I tried it and got your same results ?  Weird.

btw .... a slight mod to "name the screen" as per the current working 
directory at the time of screen invocation.

# alias ns9='if [ -f screenlog.0 ];then rm screenlog.0;fi &&
(/usr/bin/screen -S $(basename $(pwd)) -L -d -m time 
/usr/local/bin/program.sh; tail -99f
screenlog.0) && mv screenlog.0 my-test-screenlog.out'

I also have a nice alias to check running screen jobs, you might like 
that too:


alias sl='/usr/bin/screen -list;for x in ```cd 
/var/run/screen/S-root/;/bin/ls```;do echo;echo sr $x;```echo 
$x|/usr/bin/awk -F . '\''{print "/usr/bin/pstree 
-aG",$1}'\''```;done;echo;/usr/bin/w'


  -- it's a bit messier, but it works for me.

Cheers
A.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.