Last active
October 31, 2020 19:03
-
-
Save varrix/2f77d8d8a6d75e8bacb2919b8c96c38e to your computer and use it in GitHub Desktop.
Convenience function for checking if you're in a screen and outputting the id of it if so.
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
#!/bin/bash | |
############ | |
# whereami # | |
############ | |
# Req. -> screen | |
# Convenience function for checking if you're in a screen and outputting the id of it if so. | |
function whereami { | |
if [[ $(echo $STY) ]]; then | |
echo "You're in the screen: $STY" | |
else | |
echo "You're not in a screen." | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment