Skip to content

Instantly share code, notes, and snippets.

@cr0cK
cr0cK / reattach-screens.sh
Created December 1, 2023 18:49
Reattach detached screens
#!/bin/bash
# Get all detached screen sessions
SESSIONS=$(screen -ls | grep Detached | awk '{print $1}')
# Check if there are any detached sessions
if [ -z "$SESSIONS" ]; then
echo "No detached screen sessions found."
exit 0
fi
for file in *.png; do convert $file -resize x1280 -quality 60 ${file/png/jpg}; done