tags:

views:

113

answers:

2

I have a process which gives me continuously output in Screen. I want to search CamelCase words by the following Perl's regex in the output such that I can monitor actively the outputs.

/\b([a-z]*[A-Z][a-z]*){2,}\b/
+5  A: 

I tested in GNU/Screen and checked the source code. Both suggest that this is not possible. The search feature appears to support basic string matching only.

What I suggest is that you use the tee command to send your program's output to a file in addition to printing it. You can use Perl or grep on the file after that.

$ your_program | tee your_program_output
$ grep pattern your_program_output
Ayman Hourieh
Thank you for your answer! - - Did you see that it is not possible at $man screen?
Masi
Hmm, I can't find this in the man page. I'm using version 4.0.3.
Ayman Hourieh
@ayman: I neither. I am using the version 4.0.0.
Masi
@ayman: What is your default search in Screen? I ask it because I cannot get my default search work at the moment.
Masi
I'm not sure what you mean by default search. Here is what I do to search the scroll buffer:* Press ctrl+a esc.* Press ? to search backwards.* Enter a search string and hit enter.I don't have anything special for search in my screenrc. It is enabled by default.
Ayman Hourieh
+1  A: 

Yes, capture the output and search that. gnu/screen isn't the right tool for capturing data and plenty of things can go wrong with this. But obviously you can still run it inside a screen session.