For using IRC, I usually open irssi on my headless server in a screen session. Then, sometimes I detach it to wait for an answer, but sometimes I'm not sure if a screen with irssi is already open on a server.
For these times, I'd like to be able to tell screen: "Reattach to the running screen, but if it doesn't exist, create a new one by running this command". I tried to do this with:
$ screen -R irssi
but it doesn't show the desired behavior (instead, it opens an empty screen session when none exists, without running irssi).