Created
May 7, 2016 15:25
-
-
Save WesJD/eedb1b91402d6ab5ba9585078b09e221 to your computer and use it in GitHub Desktop.
Delete screen sessions with ease.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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