I would like to remove from my systems all screens I've opened to do my tasks. But I need to get rid of the screens that aren't doing anything. I don't want to kill a screen that something happens inside.
As an example, I run a long command in one screen called screen3 while screens named screen1 and screen2 are previous screens, no jobs are running inside them. The goal is to have a command or script (in crontab) that automatically clean user1 and user2.
First attempt - detection only