Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Sets up terminal environment?
- if [[ $TERM = network || -z $TERM ]]; then
- export TERM=linux
- fi
- # This script automatically runs screen & screen -r (resume) based on a set of conditions.
- # Variable DIR (variable could be anything)
- DIR="/tmp/screens/S-mobile"
- # if /tmp/screens/S-mobile list files then run screen -x
- if [ $(ls -A "$DIR") ]; then
- screen -x
- fi
- # if /tmp/screen/S-mobile contains X files = to 0 then run screen -q
- if [ $(ls -A "$DIR" | wc -l) -eq 0 ]; then
- screen -q
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement