Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. hash screen >/dev/null 2>&1 && {
  2. if [ ! -e ~/.hushlogin ]; then
  3. if [ ! -z "$STY" ]; then
  4. cat /etc/motd
  5. echo "[ screen $STY, window $WINDOW ]"
  6. elif [ ! -z "$(tty | grep -v pts)" ]; then
  7. screen -dRR $(echo "$(tty).$(hostname)" | sed -e 's:^/dev/::')
  8. fi
  9. DEAD_SCREENS=$(screen -ls | grep "Dead" | tr -s '\t' ' ' | cut -d' ' -f2 | tr '\n' ' ')
  10. if [ ! -z "$DEAD_SCREENS" ]; then
  11. echo "[ There are dead screens: $DEAD_SCREENS ]"
  12. fi
  13. unset DEAD_SCREENS
  14. fi
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement