In general, I have long simulations running on several screen sessions which can get confusing.
Is there a way to get the directory on which one specific screen session is on?
EDIT: I just realized that the easiest thing to do is just to launch the job in the background... Nevertheless, my question still stands.
You can send a command to
screen
, e.g., a shell script could do something like this (assuming the session is named MySession):That seems to work only for the first window opened in a
screen
session (rather than for the currently active one).