Created
July 12, 2016 16:24
-
-
Save jjrh/29f22263fe32e80d98e892f553887cee to your computer and use it in GitHub Desktop.
creates new tmux session with name (work) if it exists attach to it, if not create it.
This file contains hidden or 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
#!/bin/bash | |
tmux list-sessions | grep work | |
if [ $? -ne 0 ]; then | |
tmux new-session -s work | |
else | |
tmux attach -twork -d | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment