Skip to content

Instantly share code, notes, and snippets.

@alcides
Created April 27, 2009 14:42
Show Gist options
  • Save alcides/102523 to your computer and use it in GitHub Desktop.
Save alcides/102523 to your computer and use it in GitHub Desktop.
My bashrc in my VPS to launch last screen session.
#screen stuff
if [[ `screen -list | grep Detached | wc -l` == 0 ]]; then
if [ ! ${SSH_TTY} ]; then
exec screen
else
screen
fi
else
if [ ! ${SSH_TTY} ]; then
exec screen -dRR
else
screen -dRR
fi
fi
clear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment