Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use GNU screen to keep a bunch of tabs open in my terminal session, and I would like to have a bash command, watch -n 1 ps aux | grep something, that runs when I am looking at that screen tab, but stops running when I don't have any window displaying at the tab. Any ideas?

share|improve this question

1 Answer 1

no can do. this cannot be automized. sorry.

workaround: use a command alias to start such a tab/window, eg "bind S screen ~/bin/myscript". put screen into zombie mode (eg with ":zombie z"). end the script when not required any more. switch to tab and restart process with ctrl-space.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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