Skip to content

Instantly share code, notes, and snippets.

@WesJD
Created May 7, 2016 15:25
Show Gist options
  • Save WesJD/eedb1b91402d6ab5ba9585078b09e221 to your computer and use it in GitHub Desktop.
Save WesJD/eedb1b91402d6ab5ba9585078b09e221 to your computer and use it in GitHub Desktop.
Delete screen sessions with ease.
echo "----------- [ DELETE SCREEN SESSION ] -----------"
screen -ls
read -p "Please supply the screen id you would like to delete: " id
read -p "Are you sure you want to delete screen $id? [y/N]: " des
if [[ $des =~ [yY](es)* ]]
then
echo "Deleting...."
screen -S $id -p 0 -X quit
echo "Done!"
fi
echo "-------------------------------------------------"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment